Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(v.element()!= null) //if the node is not null
- {
- //if word is between word1 and word2, or same as word1 and word2
- if((v.element().getValue().getWord().compareTo(word1) > 0 && v.element().getValue().getWord().compareTo(word2) < 0) || (v.element().getValue().getWord().compareTo(word1) == 0 || (v.element().getValue().getWord().compareTo(word2) == 0)))
- betweenTwoWords.add(v.element().getValue()); //add WordNode into ArrayList betweenTwoWords
- }
Add Comment
Please, Sign In to add comment