org.hd.d.pg2k.svrCore
Interface MemoryTools.CacheMiniMap<K,V>

All Known Implementing Classes:
DuplicateIDChecker, LRUMapAutoSizeForHitRate, SimpleLRUMap, SimpleProbabilisticCache, SoftReferenceMap
Enclosing class:
MemoryTools

public static interface MemoryTools.CacheMiniMap<K,V>

Interface for minimal Map subset for caches of various flavours.


Method Summary
 void clear()
          Clear the map.
 V get(K key)
          Get an entry from the map; null if no such element.
 boolean isEmpty()
          True if the map is non-empty.
 V put(K key, V value)
          Put an entry in the map, returning previous value if any.
 V remove(K key)
          Remove an entry from the map and return the removed value, if any, else null.
 int size()
          Return the number of entries in the map; non-negative.
 

Method Detail

get

V get(K key)
Get an entry from the map; null if no such element.


put

V put(K key,
      V value)
Put an entry in the map, returning previous value if any.


remove

V remove(K key)
Remove an entry from the map and return the removed value, if any, else null.


clear

void clear()
Clear the map.


size

int size()
Return the number of entries in the map; non-negative.


isEmpty

boolean isEmpty()
True if the map is non-empty. Equivalent to (size() == 0) but may be faster for some implementations.


DHD Multimedia Gallery V1.60.69

Copyright (c) 1996-2012, Damon Hart-Davis. All rights reserved.