Adding object to arraylist unless it's already there
<p>I'm supposed to read through a file, add all the new words to an arraylist, and if the word is already in the list, increase a counter on how many times it has appeared. I read in the words just fine, but when it comes to adding them to the list, it seems to ignore the part where it checks whether the word is already in the list and adds multiples of the same word. What I've got:</p>

<p>Reading method:</p>

<pre><code>public void read(String text) throws Exception{
  File fileText = new File(text);
  Scanner in = new Scanner(fileText);
  while(in.hasNextLine()){
    newWord = new Word(in.nextLine());
    add(newWord.text);
    }
  }
</code></pre>

<p>Method for adding to arraylist</p>

<pre><code>public void add(String text){
  for(Word o: wordList){
    if(wordList.contains(newWord.text){
      newWord.increaseCount();
    }else{
      wordList.add(newWord);  
     }
   }
</code></pre>

<p>Would really appreciate some help, I'm completely lost as to where the issue lies....</p>