de.mud.bsx
Class BSXCache

java.lang.Object
  |
  +--de.mud.bsx.BSXCache

public class BSXCache
extends java.lang.Object

a LRU Cache for BSX Objects.

Version:
1.0
Author:
Thomas Kriegelstein (tk4@rb.mud.de)

Field Summary
protected  BSXObject[] bsx
          the objects
protected  int cacheSize
          the maximum size of cache
protected  java.lang.String[] ids
          the ids of the objects
protected static int NOT_FOUND
          illegal index
protected  int size
          the size of the cache
 
Constructor Summary
BSXCache()
           
 
Method Summary
 void addEntry(java.lang.String id, BSXObject bsxobject)
           
 boolean containsEntry(java.lang.String id)
           
 BSXObject getEntry(java.lang.String id)
           
 void removeEntry(java.lang.String id)
           
 int size()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cacheSize

protected int cacheSize
the maximum size of cache

ids

protected java.lang.String[] ids
the ids of the objects

bsx

protected BSXObject[] bsx
the objects

size

protected int size
the size of the cache

NOT_FOUND

protected static final int NOT_FOUND
illegal index
Constructor Detail

BSXCache

public BSXCache()
Method Detail

size

public int size()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getEntry

public BSXObject getEntry(java.lang.String id)

removeEntry

public void removeEntry(java.lang.String id)

addEntry

public void addEntry(java.lang.String id,
                     BSXObject bsxobject)

containsEntry

public boolean containsEntry(java.lang.String id)