Example #1
0
 @Override
 public String getStringValue() {
   String res = "";
   for (ComponentOfWord componentOfWord : components) {
     res += componentOfWord.getValue();
   }
   return res;
 }
Example #2
0
 /** Deletes all subsequent occurrences of the word the first letter of the word. */
 public void removeFirstOccurrence() {
   if (components.size() != 0) {
     char first = components.get(0).getValue();
     int i = 1;
     ComponentOfWord componentOfWord;
     while (i < components.size()) {
       componentOfWord = components.get(i);
       if (componentOfWord.getValue() == first) {
         components.remove(i);
       } else {
         i++;
       }
     }
   }
 }