Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.modama.gui.tools
Class Cache  view Cache download Cache.java

java.lang.Object
  extended byorg.modama.gui.tools.Cache

public abstract class Cache
extends java.lang.Object

This class encapsulate a cache stragety. currently it just a lookup-table-cache (call get(key) and you get the object from the hashmap if its already exists. if not create(key) is called)


Field Summary
(package private)  java.util.HashMap cache
           
 
Constructor Summary
Cache()
           
 
Method Summary
abstract  java.lang.Object create(java.lang.Object key)
          put code to create an object related to key here
 java.lang.Object get(java.lang.Object key)
          get the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache

java.util.HashMap cache
Constructor Detail

Cache

public Cache()
Method Detail

get

public java.lang.Object get(java.lang.Object key)
get the object. if key does not exists it will be created with create(key)


create

public abstract java.lang.Object create(java.lang.Object key)
put code to create an object related to key here