Package de.gsi.dataset.utils
Class CacheCollection<T>
- java.lang.Object
-
- java.util.AbstractCollection<T>
-
- de.gsi.dataset.utils.CacheCollection<T>
-
- Type Parameters:
T- generic for object type to be cahced.
- All Implemented Interfaces:
java.lang.Iterable<T>,java.util.Collection<T>
- Direct Known Subclasses:
ByteArrayCache,DoubleArrayCache
public class CacheCollection<T> extends java.util.AbstractCollection<T>Implements collection of cache-able objects that can be used to store recurring storage container.N.B. this implements only the backing cache of adding, removing, etc. elements. The cache object retrieval should be implemented in the derived class. See for example
ByteArrayCache.- Author:
- rstein
-
-
Constructor Summary
Constructors Constructor Description CacheCollection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(T recoveredObject)protected voidcleanup()voidclear()booleancontains(java.lang.Object object)java.util.Iterator<T>iterator()booleanremove(java.lang.Object o)intsize()-
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
contents
protected final java.util.List<java.lang.ref.Reference<T>> contents
-
-