final String hash= fHashProvider.getHash(word); final char[] mutators= fHashProvider.getMutators(); characters[index + 1]= next; neighborhood.add(fHashProvider.getHash(new String(characters))); neighborhood.add(fHashProvider.getHash(new String(characters))); neighborhood.add(fHashProvider.getHash(new String(characters))); neighborhood.add(fHashProvider.getHash(new String(characters))); if (offset == 0) break;
/** * Hashes the word into the dictionary. * * @param word * The word to hash in the dictionary */ protected final void hashWord(final String word) { final String hash= fHashProvider.getHash(word); Object bucket= fHashBuckets.get(hash); if (bucket == null) { fHashBuckets.put(hash, word); } else if (bucket instanceof ArrayList) { ((ArrayList)bucket).add(word); } else { ArrayList list= new ArrayList(BUCKET_CAPACITY); list.add(bucket); list.add(word); fHashBuckets.put(hash, list); } }
final String hash= fHashProvider.getHash(word); ByteArrayWrapper hashBytes; byte[] wordBytes;
final String hash= fHashProvider.getHash(word); final char[] mutators= fHashProvider.getMutators(); characters[index + 1]= next; neighborhood.add(fHashProvider.getHash(new String(characters))); neighborhood.add(fHashProvider.getHash(new String(characters))); neighborhood.add(fHashProvider.getHash(new String(characters))); neighborhood.add(fHashProvider.getHash(new String(characters))); if (offset == 0) break;
final String hash= fHashProvider.getHash(word); ByteArrayWrapper hashBytes; byte[] wordBytes;
final String hash= fHashProvider.getHash(word); final char[] mutators= fHashProvider.getMutators(); characters[index + 1]= next; neighborhood.add(fHashProvider.getHash(new String(characters))); neighborhood.add(fHashProvider.getHash(new String(characters))); neighborhood.add(fHashProvider.getHash(new String(characters))); neighborhood.add(fHashProvider.getHash(new String(characters))); if (offset == 0) break;
public boolean isCorrect(String word) { word= stripNonLetters(word); try { if (!fLoaded) { synchronized (this) { fLoaded= load(getURL()); if (fLoaded) compact(); } } } catch (MalformedURLException exception) { // Do nothing } final Object candidates= getCandidates(fHashProvider.getHash(word)); if (candidates == null) return false; else if (candidates instanceof String) { String candidate= (String)candidates; if (candidate.equals(word) || candidate.equals(word.toLowerCase())) return true; return false; } final ArrayList candidateList= (ArrayList)candidates; if (candidateList.contains(word) || candidateList.contains(word.toLowerCase())) return true; return false; }
final Object candidates= getCandidates(fHashProvider.getHash(word)); if (candidates == null) return;
final Object candidates= getCandidates(fHashProvider.getHash(word)); if (candidates == null) return;
final Object candidates= getCandidates(fHashProvider.getHash(word)); if (candidates == null) return;
final Object candidates= getCandidates(fHashProvider.getHash(word)); if (candidates == null) return false;
final Object candidates= getCandidates(fHashProvider.getHash(word)); if (candidates == null) return false;