Package toxi.util.datatypes
Class UniqueItemIndex<T>
java.lang.Object
toxi.util.datatypes.UniqueItemIndex<T>
- All Implemented Interfaces:
ItemIndex<T>
- Direct Known Subclasses:
SpatialIndex
This class is used to build an unique set of items and offers a
bi-directional mapping between items and their associated ID values. Items
are added via the
index(Object) method and removed via
unindex(Object). The item's Object.hashCode() is used as unique
identifier, so you MUST ensure the item class satisfies the contract of
Object.hashCode() and Object.equals(Object).-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
UniqueItemIndex
public UniqueItemIndex() -
UniqueItemIndex
-
-
Method Details
-
clear
public void clear() -
forID
-
getID
-
getItems
-
index
-
isIndexed
-
reindex
-
size
public int size() -
unindex
-