import java.util.ArrayList;
import java.util.List;
import java.util.Random;

/**
 * Created by tvoyamamka on 08.07.2014.
 */
public class RandomSentenceGen {

    private String sentence;

    public RandomSentenceGen() {
        ListOfWords.fillList();
    }

    public String getSentence() {
        sentence = ListOfWords.getArticles()+
                   ListOfWords.getFirstNouns()+
                   ListOfWords.getVerbs()+
                   ListOfWords.getArticles()+
                   ListOfWords.getAdjective()+
                   ListOfWords.getSecondNouns();
        return sentence;
    }

    private static class ListOfWords {
        protected static  List<String> articles = new ArrayList<String>();
        protected static  List<String> firstNouns = new ArrayList<String>();
        protected static  List<String> verbs = new ArrayList<String>();
        protected static  List<String> secondNouns = new ArrayList<String>();
        protected static  List<String> adjective = new ArrayList<String>();
        private static void fillList() {
            articles.add("a");
            articles.add("the");
            firstNouns.add("man");
            firstNouns.add("woman");
            firstNouns.add("mamka");
            firstNouns.add("erohin");
            firstNouns.add("harkach");
            verbs.add("retrieve");
            verbs.add("find");
            verbs.add("clear");
            verbs.add("hit");
            verbs.add("take");
            verbs.add("deserve");
            secondNouns.add("dick");
            secondNouns.add("car");
            secondNouns.add("dog");
            secondNouns.add("abu");
            secondNouns.add("shop");
            secondNouns.add("bar");
            secondNouns.add("foo");
            adjective.add("dirty");
            adjective.add("angry");
            adjective.add("unstable");
            adjective.add("real");
            adjective.add("inner");
        }

        public static String getArticles() {
            return articles.get(new Random().nextInt(2))+" ";
        }

        public static String getFirstNouns() {
            return firstNouns.get(new Random().nextInt(5))+" ";
        }

        public static String getVerbs() {
            return verbs.get(new Random().nextInt(6))+" ";
        }

        public static String getSecondNouns() {
            return secondNouns.get(new Random().nextInt(7))+" ";
        }

        public static String getAdjective() {
            return adjective.get(new Random().nextInt(5))+" ";
        }
    }
}
