public class ObjectIndex extends Object implements Comparator
sort()
method yourself to only perform sort once. Everytime you
add an object however the sort status of the List of objects will be invalidated and
have to be re-sorted before you have retrieve the objects again.Constructor and Description |
---|
ObjectIndex(Class c) |
Modifier and Type | Method and Description |
---|---|
void |
add(String name) |
void |
addObject(Object o) |
int |
compare(Object o,
List keys) |
int |
compare(Object o1,
Object o2) |
List |
getObjects(List keys) |
boolean |
isSyncOnAdd() |
void |
removeObject(Object o) |
void |
setSyncOnAdd(boolean v) |
int |
size() |
void |
sort() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public ObjectIndex(Class c)
public boolean isSyncOnAdd()
public void setSyncOnAdd(boolean v)
public int size()
public void sort()
public void add(String name)
public void removeObject(Object o)
public void addObject(Object o)
public int compare(Object o1, Object o2)
compare
in interface Comparator