T
- type of objects in this IndexedSet
@ThreadSafe public abstract class IndexDefinition<T> extends Object
IndexedSet
. Each instance of
this class must implement the method to define how to get the value of the field chosen as
the index key. Users use this indexDefinition class as the parameter in all methods of
IndexedSet
to represent an index.Constructor and Description |
---|
IndexDefinition(boolean isUnique)
Constructs a new
IndexDefinition instance. |
Modifier and Type | Method and Description |
---|---|
abstract Object |
getFieldValue(T o)
Gets the value of the field that serves as index.
|
boolean |
isUnique() |
public IndexDefinition(boolean isUnique)
IndexDefinition
instance.isUnique
- whether the index is unique. A unique index is an index where each index value
only maps to one object; A non-unique index is an index where an index value
can map to one or more objects.Copyright © 2023. All Rights Reserved.