jsdsi
Class ObjectHash

java.lang.Object
  extended byjsdsi.Obj
      extended byjsdsi.ObjectHash
All Implemented Interfaces:
java.io.Serializable, Subject

public class ObjectHash
extends Obj
implements Subject

The cryptographic hash of an object.

Version:
$Revision: 1.4.2.1 $ $Date: 2005/11/08 03:12:52 $
Author:
Sameer Ajmani, Sean Radford
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class jsdsi.Subject
Subject.Default
 
Field Summary
 
Fields inherited from class jsdsi.Obj
_obj
 
Constructor Summary
ObjectHash(Hash h)
          The Hash of this ObjectHash.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 Hash getHash()
           
 int hashCode()
           
 boolean isHashOf(Obj o)
          Checks whether this ObjectHash is a hash of the given object.
 SexpList toSexp()
          Returns an S-expression of this ObjectHash
 
Methods inherited from class jsdsi.Obj
parseObj, parseObj, readResolve, toByteArray, toString, toString, toTransport
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectHash

public ObjectHash(Hash h)
The Hash of this ObjectHash.

Method Detail

getHash

public Hash getHash()
Returns:
the Hash of this ObjectHash.

isHashOf

public boolean isHashOf(Obj o)
Checks whether this ObjectHash is a hash of the given object.

Parameters:
o - object to check for if this object hash is a hash from it.
Returns:
true if this object hash is a hash of o, false otherwise.

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in class Obj
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Specified by:
hashCode in class Obj
See Also:
Object.hashCode()

toSexp

public SexpList toSexp()
Returns an S-expression of this ObjectHash

Specified by:
toSexp in interface Subject
Specified by:
toSexp in class Obj
Returns:
an SexpList that represents this SDSI-object.


Copyright © 2002-2006 JSDSI. All Rights Reserved.