int removeIndex = hashIndex(entry.hashCode, data.length);
int removeIndex = hashIndex(entry.hashCode, data.length);
public void testInternalState_getEntry_int() { if (isPutAddSupported() == false || isPutChangeSupported() == false) return; SingleHashCode one = new SingleHashCode("1"); SingleHashCode two = new SingleHashCode("2"); SingleHashCode three = new SingleHashCode("3"); SingleHashCode four = new SingleHashCode("4"); SingleHashCode five = new SingleHashCode("5"); SingleHashCode six = new SingleHashCode("6"); LRUMap map = new LRUMap(3, 1.0f); int hashIndex = map.hashIndex(map.hash(one), 4); map.put(one, "A"); map.put(two, "B"); map.put(three, "C"); assertEquals(one, map.getEntry(0).key); assertEquals(two, map.getEntry(1).key); assertEquals(three, map.getEntry(2).key); try { map.getEntry(-1); fail(); } catch (IndexOutOfBoundsException ex) {} try { map.getEntry(3); fail(); } catch (IndexOutOfBoundsException ex) {} }
int hashIndex = map.hashIndex(map.hash(one), 4); map.put(one, "A"); map.put(two, "B");
int removeIndex = hashIndex(entry.hashCode, data.length);
int removeIndex = hashIndex(entry.hashCode, data.length);
int removeIndex = hashIndex(entry.hashCode, data.length);
int removeIndex = hashIndex(entry.hashCode, data.length);
int removeIndex = hashIndex(entry.hashCode, data.length);