diff --git a/src/Text.java b/src/Text.java index 0f9c165..33274b5 100644 --- a/src/Text.java +++ b/src/Text.java @@ -140,7 +140,7 @@ public class Text { */ public ArrayList index() { HashMap> wordbook = new HashMap<>(); - wordbook = createWordlist(wordbook); + createWordlist(wordbook); String input; ArrayList output = new ArrayList<>(); ArrayList values; @@ -168,7 +168,7 @@ public class Text { * * @return HashMap> */ - private HashMap> createWordlist(HashMap> wordbook) { + private void createWordlist(HashMap> wordbook) { int counter; ArrayList numbersList; String firstLetter; @@ -187,7 +187,6 @@ public class Text { counter = numbersList.get(0); numbersList.remove(0); numbersList.add(0, counter + 1); - if (numbersList.get(numbersList.size() - 1) < i + 1) { numbersList.add(i + 1); } @@ -199,7 +198,6 @@ public class Text { wordbook.put(word, numbersList); } } - return wordbook; } }