anthill.types
Class SimpleDocumentId

java.lang.Object
  |
  +--anthill.types.SimpleDocumentId
All Implemented Interfaces:
Comparable, DocumentId

public class SimpleDocumentId
extends Object
implements DocumentId

Version:
$Revision: 1.1 $
Author:
Alberto Montresor (montresor@cs.unibo.it)

Field Summary
 
Fields inherited from interface anthill.types.DocumentId
NAME
 
Constructor Summary
SimpleDocumentId()
           
 
Method Summary
 int compareTo(Object obj)
          Compares this object with the specified object for order.
 boolean equals(Object obj)
          Check whether this hashed keyword is equal to the specified object.
 byte[] getDigest()
          Returns the byte representation of the digest associated to this document identifier.
 int getLength()
          Returns the length of the document
 int hashCode()
          Returns a hash code value for the object.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleDocumentId

public SimpleDocumentId()
Method Detail

getLength

public int getLength()
Returns the length of the document

Specified by:
getLength in interface DocumentId

getDigest

public byte[] getDigest()
Returns the byte representation of the digest associated to this document identifier.

Specified by:
getDigest in interface DocumentId

toString

public String toString()
Returns a string representation of the object.

Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Check whether this hashed keyword is equal to the specified object.

Overrides:
equals in class Object

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class Object

compareTo

public int compareTo(Object obj)
              throws ClassCastException
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Specified by:
compareTo in interface Comparable
Parameters:
obj - the object to be compared
ClassCastException