## org.biojava.utils.cache
Class FixedSizeMap

    java.lang.Object
      org.biojava.utils.cache.FixedSizeMap

All Implemented Interfaces:
  CacheMap

    public class FixedSizeMap

extends java.lang.Object
implements CacheMap

A cache that only remembers a given number of keys.

Since:
  1.2
Author:
  Matthew Pocock

Constructor Summary
`FixedSizeMap(int maxSize)`

Method Summary
`java.lang.Object` `get(java.lang.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.
`int` `getMaxSize()`
`void` `put(java.lang.Object key, java.lang.Object value)` Associate a value with a key.
`void` `remove(java.lang.Object key)` Explicitly remove an object.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FixedSizeMap

    public FixedSizeMap(int maxSize)

Method Detail

### getMaxSize

    public int getMaxSize()

### put

    public void put(java.lang.Object key,
                    java.lang.Object value)

  Description copied from interface: `CacheMap`
  Associate a value with a key. The association may be broken at any time.

  Specified by:
    `put` in interface `CacheMap`
  Parameters:
    `key` - the key Object
    `value` - the Object to associate with the key

### get

    public java.lang.Object get(java.lang.Object key)

  Description copied from interface: `CacheMap`
  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.

  Specified by:
    `get` in interface `CacheMap`
  Parameters:
    `key` - the key Object
  Returns:
    the Object currently associated with the key

### remove

    public void remove(java.lang.Object key)

  Description copied from interface: `CacheMap`
  Explicitly remove an object.

  Specified by:
    `remove` in interface `CacheMap`
  Parameters:
    `key` - the item to remove