@Test public void testTouch() { map.put("hello", "world"); long updateTime = Clock.currentTimeMillis(); SortedHashMap.touch(map, "hello", SortedHashMap.OrderingType.LFU); long lastAccess = map.getEntry("hello").lastAccess; assertTrue(Math.abs(updateTime - lastAccess) < 100); }
public static void touch(SortedHashMap linkedMap, Object key, OrderingType orderingType) { Entry e = linkedMap.getEntry(key); if (e != null) { e.touch(linkedMap, orderingType); } }
SortedHashMap extends AbstractMap<K, V> { public static void touch(SortedHashMap linkedMap, Object key, OrderingType orderingType) { Entry e = linkedMap.getEntry(key); if (e != null) { e.touch(linkedMap, orderingType); } } }
SortedHashMap extends AbstractMap<K, V> { public static void touch(SortedHashMap linkedMap, Object key, OrderingType orderingType) { Entry e = linkedMap.getEntry(key); if (e != null) { e.touch(linkedMap, orderingType); } } SortedHashMap();  SortedHashMap(int initialCapacity);  SortedHashMap(int initialCapacity, OrderingType orderingType);  SortedHashMap(int initialCapacity, float loadFactor, OrderingType orderingType); }
SortedHashMap extends AbstractMap<K, V> { public static void touch(SortedHashMap linkedMap, Object key, OrderingType orderingType) { Entry e = linkedMap.getEntry(key); if (e != null) { e.touch(linkedMap, orderingType); } } SortedHashMap();  SortedHashMap(int initialCapacity);  SortedHashMap(int initialCapacity, OrderingType orderingType);  SortedHashMap(int initialCapacity, float loadFactor, OrderingType orderingType); V put(K key, V value); static void touch(SortedHashMap linkedMap, Object key, OrderingType orderingType); static void moveToTop(SortedHashMap linkedMap, Object key); static OrderingType getOrderingTypeByName(String orderingType); boolean containsKey(Object key); V get(Object key); void clear(); V remove(Object key); boolean containsValue(Object value); Set<K> keySet(); Collection<V> values(); Set<Map.Entry<K, V>> entrySet(); }
SortedHashMap extends AbstractMap<K, V> { public static void touch(SortedHashMap linkedMap, Object key, OrderingType orderingType) { Entry e = linkedMap.getEntry(key); if (e != null) { e.touch(linkedMap, orderingType); } } SortedHashMap();  SortedHashMap(int initialCapacity);  SortedHashMap(int initialCapacity, OrderingType orderingType);  SortedHashMap(int initialCapacity, float loadFactor, OrderingType orderingType); V put(K key, V value); static void touch(SortedHashMap linkedMap, Object key, OrderingType orderingType); static void moveToTop(SortedHashMap linkedMap, Object key); static OrderingType getOrderingTypeByName(String orderingType); boolean containsKey(Object key); V get(Object key); void clear(); V remove(Object key); boolean containsValue(Object value); Set<K> keySet(); Collection<V> values(); Set<Map.Entry<K, V>> entrySet();  }