Class IndexedCollection<K,C>

Type Parameters:
K - the type of object in the index.
C - the type of object in the collection.
All Implemented Interfaces:
Serializable, Iterable<C>, Collection<C>

public class IndexedCollection<K,C> extends AbstractCollectionDecorator<C>
An IndexedCollection is a Map-like view onto a Collection. It accepts a keyTransformer to define how the keys are converted from the values.

Modifications made to this decorator modify the index as well as the decorated Collection. However, modifications to the underlying Collection will not update the index and it will get out of sync.

If modification of the decorated Collection is unavoidable, then a call to reindex() will update the index to the current contents of the Collection.

See Also: