@Override public List<Match> execute(String password) { String reversedPassword = new StringBuilder(password).reverse().toString(); List<Match> matches = new ArrayList<>(); for (Match match: new DictionaryMatcher(this.rankedDictionaries).execute(reversedPassword)) { matches.add(MatchFactory.createReversedDictionaryMatch( password.length() - 1 - match.j, password.length() - 1 - match.i, new StringBuilder(match.token).reverse().toString(), match.matchedWord, match.rank, match.dictionaryName)); } return this.sorted(matches); } }
@Override public List<Match> execute(String password) { String reversedPassword = new StringBuilder(password).reverse().toString(); List<Match> matches = new ArrayList<>(); for (Match match: new DictionaryMatcher(this.rankedDictionaries).execute(reversedPassword)) { matches.add(MatchFactory.createReversedDictionaryMatch( password.length() - 1 - match.j, password.length() - 1 - match.i, new StringBuilder(match.token).reverse().toString(), match.matchedWord, match.rank, match.dictionaryName)); } return this.sorted(matches); } }