package org.academiadecodigo.enuminatti.uniqueworld;

import java.util.Iterator;

/**
 * MIT License
 * (c) 2017 Ricardo Constantino
 */

public class Main {
    public static void main(String[] args) {
        UniqueWord wordSet = new UniqueWord();

        wordSet.add("as meninas da ribeira do sado é que é");
        wordSet.add("lavram a terra com as unhas dos pés");
        wordSet.add("as meninas da ribeira do sado");
        wordSet.add("são como as ovelhas");
        wordSet.add("têm carrapatos atrás das orelhas");

        for (String word : wordSet) {
            System.out.println(word);
        }

        System.out.println("There are " + wordSet.size() + " unique words in" +
                " the second verse of Meninas da Ribeira do Sado\n");

        UniqueWord brighentiSet = new UniqueWord();

        brighentiSet.add("pata pata pata");
        brighentiSet.add("pita peta pota puta");

        for (String word : brighentiSet) {
            System.out.println(word);
        }
        System.out.println("There are " + brighentiSet.size() + " unique words in" +
                " Brighenti's set");

        Iterator<String> brighentiIt = brighentiSet.iterator();

        while (brighentiIt.hasNext()) {
            System.out.println(brighentiIt.next());
        }
    }
}
