Servertec
Persistent Object Store
1.4.1 09/04/2005

stec.pos
Class IndexObject

java.lang.Object
  extended by stec.pos.IndexObject
All Implemented Interfaces:
java.io.Serializable

public class IndexObject
extends java.lang.Object
implements java.io.Serializable

Convenience wrapper class for object stored in Indexes as key or value.

Since:
1.1.0 09/01/2002
See Also:
Serialized Form

Field Summary
static int EQUAL_TO
          Used when the two objects being compared are the same.
static int GREATER_THAN
          Used when the current object is greater than the specified object.
static int LESS_THAN
          Used when the current object is less than the specified object.
 
Constructor Summary
IndexObject()
          Default constructor used to construct a new null object.
IndexObject(java.lang.Object object)
          Constracts a new IndexObject for the specified object.
 
Method Summary
 int compareTo(IndexObject index_object)
          Returns whether the current IndexObject equals the specified IndexObject or which IndexObject is greater than and which IndexObject is less than.
 int compareTo(java.lang.Object object)
          Returns whether the current IndexObject equals the specified IndexObject or which IndexObject is greater than and which IndexObject is less than.
 boolean equals(IndexObject index_object)
          Returns whether the current object is the same as the specified index object.
 boolean equals(java.lang.Object object)
          Returns whether the current object is the same as the specified object.
 java.lang.Object getObject()
          Returns the current object.
 void setObject(java.lang.Object object)
          Sets the current object to the specified object.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EQUAL_TO

public static final int EQUAL_TO
Used when the two objects being compared are the same.

See Also:
Constant Field Values

GREATER_THAN

public static final int GREATER_THAN
Used when the current object is greater than the specified object.

See Also:
Constant Field Values

LESS_THAN

public static final int LESS_THAN
Used when the current object is less than the specified object.

See Also:
Constant Field Values
Constructor Detail

IndexObject

public IndexObject()
Default constructor used to construct a new null object.


IndexObject

public IndexObject(java.lang.Object object)
Constracts a new IndexObject for the specified object.

Parameters:
object - the object to wrap.
Method Detail

getObject

public java.lang.Object getObject()
Returns the current object.

Returns:
the current object.

setObject

public void setObject(java.lang.Object object)
Sets the current object to the specified object.

Parameters:
object - the object to replace the current object.

equals

public boolean equals(java.lang.Object object)
               throws java.lang.ClassCastException,
                      java.lang.RuntimeException
Returns whether the current object is the same as the specified object.

Overrides:
equals in class java.lang.Object
Parameters:
object - the object to compare the current object against.
Returns:
whether the current object is the same as the specified object.
Throws:
ClassCastExeption - if the specified object is not an instance of IndexObject.
java.lang.RuntimeException - if any other errors occur while comparing the two objects.
java.lang.ClassCastException

equals

public boolean equals(IndexObject index_object)
               throws java.lang.ClassCastException,
                      java.lang.RuntimeException
Returns whether the current object is the same as the specified index object.

Parameters:
index_object - the object to compare the current object against.
Returns:
whether the current object is the same as the specified index object.
Throws:
ClassCastExeption - if the specified object is not an instance of IndexObject.
java.lang.RuntimeException - if any other errors occur while comparing the two objects.
java.lang.ClassCastException

compareTo

public int compareTo(java.lang.Object object)
              throws java.lang.ClassCastException,
                     java.lang.RuntimeException
Returns whether the current IndexObject equals the specified IndexObject or which IndexObject is greater than and which IndexObject is less than.

Parameters:
object - the IndexObject to compare.
Returns:
the value 0 if the current IndexObject is equal to the specified IndexObject; a value less than 0 if the current IndexObject is less than the specified IndexObject; and a value greater than 0 if the current IndexObject is greater than the specified IndexObject.
Throws:
ClassCastExeption - if the object specified is not an IndexObject.
java.lang.RuntimeException - if any other errors occur while comparing the two objects.
java.lang.ClassCastException

compareTo

public int compareTo(IndexObject index_object)
              throws java.lang.ClassCastException,
                     java.lang.RuntimeException
Returns whether the current IndexObject equals the specified IndexObject or which IndexObject is greater than and which IndexObject is less than.

Parameters:
index_object - the IndexObject to compare.
Returns:
the value 0 if the current IndexObject is equal to the specified IndexObject; a value less than 0 if the current IndexObject is less than the specified IndexObject; and a value greater than 0 if the current IndexObject is greater than the specified IndexObject.
Throws:
ClassCastExeption - if the specified object is not an instance of IndexObject.
java.lang.RuntimeException - if any other errors occur while comparing the two objects.
java.lang.ClassCastException

Servertec
Persistent Object Store
1.4.1 09/04/2005

Copyright © 2001-2005 Servertec. All rights reserved.