|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.coyotegulch.jisp.KeyObject
public abstract class KeyObject
KeyObject defines an characteristics of an object to be used as a key * in an ObjectIndex. Since Java lacks true generic types, it is up to * the programmer to ensure that all KeyObjects have the same concrete type * for a given ObjectIndex. Each ObjectIndex supports a single * concrete KeyObject type. *
* Concrete KeyObject classes must always produce a
ObjectIndex,
Serialized Form| Field Summary | |
|---|---|
static int |
KEY_EQUAL
Returned by compareTo when the invoking key is greater than the parameter key. |
static int |
KEY_ERROR
Returned by compareTo when the invoking key has a different type from the parameter key. |
static int |
KEY_LESS
Returned by compareTo when the invoking key is less than the parameter key. |
static int |
KEY_MORE
Returned by compareTo when the invoking key equals the parameter key. |
| Constructor Summary | |
|---|---|
KeyObject()
|
|
| Method Summary | |
|---|---|
abstract int |
compareTo(KeyObject key)
Compares the invoking object to key, returning one of the KEY_*
constants based on the relationship of the two keys. |
abstract KeyObject |
makeNullKey()
Returns a "null" (i.e., blank) key, to be used as a space-holder in certain kinds of ObjectIndexes. |
java.lang.String |
toString()
Returns the String representation of a KeyObject. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.io.Externalizable |
|---|
readExternal, writeExternal |
| Field Detail |
|---|
public static final int KEY_LESS
compareTo when the invoking key is less than the parameter key.
public static final int KEY_EQUAL
compareTo when the invoking key is greater than the parameter key.
public static final int KEY_MORE
compareTo when the invoking key equals the parameter key.
public static final int KEY_ERROR
compareTo when the invoking key has a different type from the parameter key.
| Constructor Detail |
|---|
public KeyObject()
| Method Detail |
|---|
public abstract int compareTo(KeyObject key)
key, returning one of the KEY_*
constants based on the relationship of the two keys.
key - The key value to be compared against the invoking key. * @return One of the KEY_* constants based on the relationship of the two keys.public abstract KeyObject makeNullKey()
ObjectIndexes.
For example, a BTreeIndex maintains a set of index pages that must contain
a set number of fixed-length keys. When creating a BTreeIndex, you must provide
a "null" key, using the makeNullKey method.
BTreeIndexpublic java.lang.String toString()
String representation of a KeyObject.
toString in class java.lang.ObjectString representation of a KeyObject.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||