Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojava.utils.cache
Interface CacheMap

All Known Implementing Classes:
  FixedSizeMap, WeakCacheMap

    public interface CacheMap

Interface for managing caches of objects fetchable by key.

The map may chose to remove a mapping, for example to free memory, or if the data has become too old to be useful.

Since:
  1.1
Author:
  Matthew Pocock

Method Summary
`Object` | `get(Object key)` Retrieve the Object associated with the key, or null if either no value has been associated or if the key's value has been cleared by the cache.
`void` | `put(Object key, Object value)` Associate a value with a key.
`void` | `remove(Object value)` Explicitly remove an object.

Method Detail

### put

    void put(Object key,
             Object value)

  Associate a value with a key. The association may be broken at any time.

  Parameters:
    `key` - the key Object
    `value` - the Object to associate with the key

### get

    Object get(Object key)

  Retrieve the Object associated with the key, or null if either no value has been associated or if the key's value has been cleared by the cache.

  Parameters:
    `key` - the key Object
  Returns:
    the Object currently associated with the key

### remove

    void remove(Object value)

  Explicitly remove an object.

  Parameters:
    `value` - the item to remove

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD