org.garret.perst
Class PersistentComparator<T extends IPersistent>
java.lang.Object
org.garret.perst.Persistent
org.garret.perst.PersistentComparator
- All Implemented Interfaces:
- java.io.Externalizable, IPersistent, java.io.Serializable
- public abstract class PersistentComparator<T extends IPersistent>
- extends Persistent
Base class for persistent comparator used in SortedCollection class
- See Also:
- Serialized Form
|
Method Summary |
abstract int |
compareMembers(T m1,
T m2)
Compare two members of collection |
abstract int |
compareMemberWithKey(T mbr,
java.lang.Object key)
Compare member with specified search key |
| Methods inherited from class org.garret.perst.Persistent |
assignOid, deallocate, equals, getOid, getStorage, hashCode, invalidate, isDeleted, isModified, isPersistent, isRaw, load, loadAndModify, makePersistent, modify, onLoad, onStore, readExternal, recursiveLoading, store, writeExternal |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
PersistentComparator
public PersistentComparator()
compareMembers
public abstract int compareMembers(T m1,
T m2)
- Compare two members of collection
- Parameters:
m1 - first membersm2 - second members
- Returns:
- negative number if m1 < m2, zero if m1 == m2 and positive number if m1 > m2
compareMemberWithKey
public abstract int compareMemberWithKey(T mbr,
java.lang.Object key)
- Compare member with specified search key
- Parameters:
mbr - collection memberkey - search key
- Returns:
- negative number if mbr < key, zero if mbr == key and positive number if mbr > key