|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface DataIndex
A DataIndex maintains a list of objects associated with values. The objects can then be retrieved based on the values. This class should not be much more complex than a simple map or list because the DataSoup is responsible for populating it.
| Method Summary | |
|---|---|
java.lang.Object |
addObject(java.lang.Object anObject,
java.lang.Object newValue)
Adds an object to be associated with the specified value. |
void |
clear()
Removes all objects from the index. |
java.lang.String |
getName()
Gets the name of this index. |
java.lang.String |
getProperty()
The property managed by this index. |
java.util.List |
query(java.lang.Object beginValue,
java.lang.Object endValue)
Returns all objects in the index whose associated values fall between the two specified values, inclusive. |
java.lang.Object |
removeObject(java.lang.Object anObject,
java.lang.Object oldValue)
Removes an object from the index. |
java.lang.Object |
updateObject(java.lang.Object anObject,
java.lang.Object oldValue,
java.lang.Object newValue)
Updates an object previously associated with the specified value to be associated with the specified new value. |
| Method Detail |
|---|
java.lang.String getName()
java.lang.String getProperty()
java.lang.Object addObject(java.lang.Object anObject,
java.lang.Object newValue)
anObject - A data object, usually but not always a DataKey.newValue - The property value to be associated with the data object.
java.lang.Object updateObject(java.lang.Object anObject,
java.lang.Object oldValue,
java.lang.Object newValue)
anObject - A data object, usually but not always a DataKey.oldValue - The value currently associated with the data object.newValue - The value to be associated with the data object.
java.lang.Object removeObject(java.lang.Object anObject,
java.lang.Object oldValue)
anObject - A data object, usually but not always a DataKey.oldValue - The value currently associated with the data object.
void clear()
java.util.List query(java.lang.Object beginValue,
java.lang.Object endValue)
beginValue - The beginning value, or null for all values
up to an including the end key.endValue - The ending value, or null for all values
since and including the begin key.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||