private int getSlot(char[] text, int off, int len) { int code = getHashCode(text, off, len); int pos = code & (keys.length-1); char[] text2 = keys[pos]; if (text2 != null && !equals(text, off, len, text2)) { final int inc = ((code>>8)+code)|1; do { code += inc; pos = code & (keys.length-1); text2 = keys[pos]; } while (text2 != null && !equals(text, off, len, text2)); } return pos; }
private int getSlot(char[] text, int off, int len) { int code = getHashCode(text, off, len); int pos = code & (keys.length-1); char[] text2 = keys[pos]; if (text2 != null && !equals(text, off, len, text2)) { final int inc = ((code>>8)+code)|1; do { code += inc; pos = code & (keys.length-1); text2 = keys[pos]; } while (text2 != null && !equals(text, off, len, text2)); } return pos; }
/** Returns true if the String is in the set */ private int getSlot(CharSequence text) { int code = getHashCode(text); int pos = code & (keys.length-1); char[] text2 = keys[pos]; if (text2 != null && !equals(text, text2)) { final int inc = ((code>>8)+code)|1; do { code += inc; pos = code & (keys.length-1); text2 = keys[pos]; } while (text2 != null && !equals(text, text2)); } return pos; }
/** Returns true if the String is in the set */ private int getSlot(CharSequence text) { int code = getHashCode(text); int pos = code & (keys.length-1); char[] text2 = keys[pos]; if (text2 != null && !equals(text, text2)) { final int inc = ((code>>8)+code)|1; do { code += inc; pos = code & (keys.length-1); text2 = keys[pos]; } while (text2 != null && !equals(text, text2)); } return pos; }