org.vrspace.util
Class Cache

java.lang.Object
  extended byorg.vrspace.util.Cache

public class Cache
extends java.lang.Object

Soft cache. Does not prevent cached object from being reclaimed by gc.


Constructor Summary
Cache()
           
 
Method Summary
 java.lang.Object get(java.lang.Object key)
          Retreives an object from the cache
static void main(java.lang.String[] args)
           
 void put(java.lang.Object key, java.lang.Object value)
          Stores an object to the cache.
 void remove(java.lang.Object key)
          Removes an object from the cache
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cache

public Cache()
Method Detail

put

public void put(java.lang.Object key,
                java.lang.Object value)
Stores an object to the cache.


get

public java.lang.Object get(java.lang.Object key)
Retreives an object from the cache


remove

public void remove(java.lang.Object key)
Removes an object from the cache


size

public int size()

main

public static void main(java.lang.String[] args)