org.planx.xmlstore.references
Class ValueReference
java.lang.Object
org.planx.xmlstore.references.ValueReference
- All Implemented Interfaces:
- Serializable, Comparable<ValueReference>, Reference
public class ValueReference
- extends Object
- implements Reference, Serializable, Comparable<ValueReference>
A unique location independent Reference computed from a content
hash of a Node (currently MD5). Use reference(Node) to
create a ValueReference.
- Author:
- Kasper Bøgebjerg, Henning Niss, Thomas Ambus
- See Also:
- Serialized Form
|
Field Summary |
static int |
LENGTH
|
LENGTH
public static final int LENGTH
- See Also:
- Constant Field Values
reference
public static ValueReference reference(Node n)
- Creates a
ValueReference by computing a content
hash of the tree rooted at the specified node. If the node already
has a ValueReference set (by some internal means) this
ValueReference will be returned instead of computing a
new one.
asIdentifier
public Identifier asIdentifier()
equals
public boolean equals(Object o)
- Returns
true if and only if the specified object
is also a ValueReference and it represents
the same content hash
as this ValueReference.
- Overrides:
equals in class Object
compareTo
public int compareTo(ValueReference vref)
- Specified by:
compareTo in interface Comparable<ValueReference>
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
toString
public String toString()
- Overrides:
toString in class Object
getStreamer
public static SizeStreamer<ValueReference> getStreamer()
getDiscriminator
public static org.planx.msd.Discriminator<ValueReference> getDiscriminator()
getDiscriminator
public static org.planx.msd.Discriminator<ValueReference> getDiscriminator(org.planx.msd.Memory memory)
Copyright © 2004-2005 Plan-X. All Rights Reserved.