ostore.dataobj
Class SHA1HashKey

java.lang.Object
  |
  +--ostore.util.SHA1Hash
        |
        +--ostore.dataobj.SHA1HashKey
All Implemented Interfaces:
BtreeKey, Cloneable, Comparable, QuickSerializable, SecureHash

public class SHA1HashKey
extends SHA1Hash
implements BtreeKey

Version:
$Id: SHA1HashKey.java,v 1.16 2002/07/25 06:03:19 eaton Exp $
Author:
Patrick R. Eaton

Field Summary
 
Fields inherited from class ostore.util.SHA1Hash
_bytes, FIRST_HASH, LAST_HASH, NULL_HASH, NULL_HASH_VALUE, NUM_BYTES
 
Constructor Summary
SHA1HashKey()
           
SHA1HashKey(InputBuffer buffer)
           
SHA1HashKey(String s)
           
 
Method Summary
 int compareTo(Object other)
          This routine compares this SHA1Hash to another Object
 boolean equals(BtreeKey other_key)
           
 boolean greaterThan(BtreeKey other_key)
           
 boolean greaterThanEqual(BtreeKey other_key)
           
 boolean lessThan(BtreeKey other_key)
           
 boolean lessThanEqual(BtreeKey other_key)
           
 void serialize(OutputBuffer buffer)
          Add the object to the buffer.
 int serializedSize()
           
 
Methods inherited from class ostore.util.SHA1Hash
bytes, clone, concatenateHashes, equals, fullString, hash, hash, hash, hash, hashCode, isNull, lower64bits, main, nullHash, size, toString, verify
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SHA1HashKey

public SHA1HashKey()

SHA1HashKey

public SHA1HashKey(String s)

SHA1HashKey

public SHA1HashKey(InputBuffer buffer)
Method Detail

serialize

public void serialize(OutputBuffer buffer)
Description copied from interface: QuickSerializable
Add the object to the buffer.

Specified by:
serialize in interface QuickSerializable
Overrides:
serialize in class SHA1Hash
Parameters:
buffer - the output buffer to add the object to

serializedSize

public int serializedSize()
Specified by:
serializedSize in interface BtreeKey

lessThan

public boolean lessThan(BtreeKey other_key)
Specified by:
lessThan in interface BtreeKey

lessThanEqual

public boolean lessThanEqual(BtreeKey other_key)
Specified by:
lessThanEqual in interface BtreeKey

greaterThan

public boolean greaterThan(BtreeKey other_key)
Specified by:
greaterThan in interface BtreeKey

greaterThanEqual

public boolean greaterThanEqual(BtreeKey other_key)
Specified by:
greaterThanEqual in interface BtreeKey

equals

public boolean equals(BtreeKey other_key)
Specified by:
equals in interface BtreeKey

compareTo

public int compareTo(Object other)
              throws ClassCastException
Description copied from class: SHA1Hash
This routine compares this SHA1Hash to another Object

Specified by:
compareTo in interface Comparable
Overrides:
compareTo in class SHA1Hash
Parameters:
other - SHA1Hash
Returns:
-1 if this < o, 0 if this == o, or 1 if this > o.
Throws:
ClassCastException - if o is not a SHA1Hash