org.apache.lokahi.core.common.collection
Class TMCCache<T extends Collectable>
java.lang.Object
java.util.AbstractCollection<T>
org.apache.lokahi.core.common.collection.TMCCache<T>
- All Implemented Interfaces:
- java.lang.Iterable<T>, java.util.Collection<T>
- Direct Known Subclasses:
- TMCDataStore
public class TMCCache<T extends Collectable>
- extends java.util.AbstractCollection<T>
- Version:
- $Id: TMCCache.java,v 1.4 2006/03/07 20:18:56 drtobes Exp $
- Author:
- Stephen Toback
Field Summary |
protected java.util.HashMap<java.lang.Integer,T> |
cache
|
protected java.util.HashMap<java.lang.String,java.lang.Integer> |
index
|
Methods inherited from class java.util.AbstractCollection |
addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Collection |
equals, hashCode |
index
protected java.util.HashMap<java.lang.String,java.lang.Integer> index
cache
protected java.util.HashMap<java.lang.Integer,T extends Collectable> cache
TMCCache
public TMCCache()
add
public boolean add(T t)
- Specified by:
add
in interface java.util.Collection<T extends Collectable>
- Overrides:
add
in class java.util.AbstractCollection<T extends Collectable>
get
public T get(int i)
get
public T get(java.lang.String i)
iterator
public java.util.Iterator<T> iterator()
- Specified by:
iterator
in interface java.lang.Iterable<T extends Collectable>
- Specified by:
iterator
in interface java.util.Collection<T extends Collectable>
- Specified by:
iterator
in class java.util.AbstractCollection<T extends Collectable>
size
public int size()
- Specified by:
size
in interface java.util.Collection<T extends Collectable>
- Specified by:
size
in class java.util.AbstractCollection<T extends Collectable>
values
public java.util.Collection<T> values()