org.jscience.util.cache
Class FixedSizeMap

java.lang.Object
  extended by org.jscience.util.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

Constructor Summary
FixedSizeMap(int maxSize)
          Creates a new FixedSizeMap object.
 
Method Summary
 java.lang.Object get(java.lang.Object key)
          DOCUMENT ME!
 int getMaxSize()
          DOCUMENT ME!
 void put(java.lang.Object key, java.lang.Object value)
          DOCUMENT ME!
 void remove(java.lang.Object key)
          DOCUMENT ME!
 
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)
Creates a new FixedSizeMap object.

Parameters:
maxSize - DOCUMENT ME!
Method Detail

getMaxSize

public int getMaxSize()
DOCUMENT ME!

Returns:
DOCUMENT ME!

put

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

Specified by:
put in interface CacheMap
Parameters:
key - DOCUMENT ME!
value - DOCUMENT ME!

get

public java.lang.Object get(java.lang.Object key)
DOCUMENT ME!

Specified by:
get in interface CacheMap
Parameters:
key - DOCUMENT ME!
Returns:
DOCUMENT ME!

remove

public void remove(java.lang.Object key)
DOCUMENT ME!

Specified by:
remove in interface CacheMap
Parameters:
key - DOCUMENT ME!