|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||
java.lang.Objectjava.lang.Enum<LocalAbstractObjectOrder>
messif.buckets.index.LocalAbstractObjectOrder
public enum LocalAbstractObjectOrder
Default orders of LocalAbstractObject based on attributes.
Specifically, order can be defined on object IDs, locators, data or keys.
| Enum Constant Summary | |
|---|---|
DATA
Order defined by object data hash codes |
|
KEY
Order defined by object keys |
|
LOCATOR
Order defined by object locator URIs |
|
UNIQUE_ID
Order defined by object IDs |
|
| Field Summary | |
|---|---|
static IndexComparator<AbstractObjectKey,LocalAbstractObject> |
keyToLocalObjectComparator
Index order defined by object keys |
static OperationIndexComparator<java.lang.String> |
locatorToLocalObjectComparator
Index order defined by object locators |
static IndexComparator<java.lang.Comparable,java.lang.Object> |
trivialObjectComparator
|
static OperationIndexComparator<UniqueID> |
uniqueIDComparator
Index order defined by object IDs |
| Method Summary | ||
|---|---|---|
int |
compare(LocalAbstractObject o1,
LocalAbstractObject o2)
|
|
LocalAbstractObject |
extractKey(LocalAbstractObject object)
Returns the key (used for comparison) from an indexed object. |
|
int |
indexCompare(LocalAbstractObject o1,
LocalAbstractObject o2)
Compares its two arguments for order. |
|
static
|
searchIndexByKey(Index<T> index,
AbstractObjectKey key)
Search the specified index for the object with given key. |
|
static
|
searchIndexByLocator(Index<T> index,
java.lang.String locator)
Search the specified index for the object with given locator. |
|
static
|
searchIndexByObjectID(Index<T> index,
UniqueID objectID)
Search the specified index for the object with given ID. |
|
static LocalAbstractObjectOrder |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
|
static LocalAbstractObjectOrder[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
|
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface messif.buckets.index.IndexComparator |
|---|
equals |
| Enum Constant Detail |
|---|
public static final LocalAbstractObjectOrder UNIQUE_ID
public static final LocalAbstractObjectOrder LOCATOR
public static final LocalAbstractObjectOrder DATA
public static final LocalAbstractObjectOrder KEY
| Field Detail |
|---|
public static OperationIndexComparator<UniqueID> uniqueIDComparator
public static OperationIndexComparator<java.lang.String> locatorToLocalObjectComparator
public static IndexComparator<AbstractObjectKey,LocalAbstractObject> keyToLocalObjectComparator
public static IndexComparator<java.lang.Comparable,java.lang.Object> trivialObjectComparator
| Method Detail |
|---|
public static LocalAbstractObjectOrder[] values()
for (LocalAbstractObjectOrder c : LocalAbstractObjectOrder.values()) System.out.println(c);
public static LocalAbstractObjectOrder valueOf(java.lang.String name)
name - the name of the enum constant to be returned.
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified name
java.lang.NullPointerException - if the argument is null
public int indexCompare(LocalAbstractObject o1,
LocalAbstractObject o2)
IndexComparator
indexCompare in interface IndexComparator<LocalAbstractObject,LocalAbstractObject>o1 - the key to compareo2 - the object to be compared
public int compare(LocalAbstractObject o1,
LocalAbstractObject o2)
compare in interface java.util.Comparator<LocalAbstractObject>public LocalAbstractObject extractKey(LocalAbstractObject object)
IndexComparator
extractKey in interface IndexComparator<LocalAbstractObject,LocalAbstractObject>object - the indexed (full) object
public static <T extends LocalAbstractObject> T searchIndexByObjectID(Index<T> index,
UniqueID objectID)
throws java.lang.IllegalStateException
index for the object with given ID.
T - type of objects stored in the indexindex - the index to searchobjectID - the object ID to search for
java.lang.IllegalStateException - if there was a problem reading objects from the index
public static <T extends LocalAbstractObject> T searchIndexByLocator(Index<T> index,
java.lang.String locator)
throws java.lang.IllegalStateException
index for the object with given locator.
T - type of objects stored in the indexindex - the index to searchlocator - the locator to search for
java.lang.IllegalStateException - if there was a problem reading objects from the index
public static <T extends LocalAbstractObject> T searchIndexByKey(Index<T> index,
AbstractObjectKey key)
throws java.lang.IllegalStateException
index for the object with given key.
T - type of objects stored in the indexindex - the index to searchkey - the key to search for
java.lang.IllegalStateException - if there was a problem reading objects from the index
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||