private boolean compareKeys(Object key, Object entryKey) { if (key == entryKey) { return true; } if (strategy != null && strategy != Equivalence.IDENTITY_WITH_SYSTEM_HASHCODE) { if (strategy == Equivalence.DEFAULT) { return key.equals(entryKey); } else { return strategy.equals(key, entryKey); } } return false; }
private int getHashIndex(Object key) { int hash; if (strategy != null && strategy != Equivalence.DEFAULT) { if (strategy == Equivalence.IDENTITY_WITH_SYSTEM_HASHCODE) { hash = System.identityHashCode(key); } else { hash = strategy.hashCode(key); } } else { hash = key.hashCode(); } hash = hash ^ (hash >>> 16); return hash & (getHashTableSize() - 1); }
private int getHashIndex(Object key) { int hash; if (strategy != null && strategy != Equivalence.DEFAULT) { if (strategy == Equivalence.IDENTITY_WITH_SYSTEM_HASHCODE) { hash = System.identityHashCode(key); } else { hash = strategy.hashCode(key); } } else { hash = key.hashCode(); } hash = hash ^ (hash >>> 16); return hash & (getHashTableSize() - 1); }
private boolean compareKeys(Object key, Object entryKey) { if (key == entryKey) { return true; } if (strategy != null && strategy != Equivalence.IDENTITY_WITH_SYSTEM_HASHCODE) { if (strategy == Equivalence.DEFAULT) { return key.equals(entryKey); } else { return strategy.equals(key, entryKey); } } return false; }