ModeShape Distribution 3.0.0.Beta4

org.modeshape.jcr.value
Class BinaryKey

java.lang.Object
  extended by org.modeshape.jcr.value.BinaryKey
All Implemented Interfaces:
Serializable, Comparable<BinaryKey>

@Immutable
public class BinaryKey
extends Object
implements Serializable, Comparable<BinaryKey>

The internal key used to identify a unique BINARY value.

See Also:
Serialized Form

Constructor Summary
BinaryKey(byte[] hash)
           
BinaryKey(String key)
           
 
Method Summary
 int compareTo(BinaryKey other)
           
 boolean equals(Object obj)
           
 int hashCode()
           
static BinaryKey keyFor(byte[] content)
           
 byte[] toBytes()
          Get this binary key in the form of a byte array.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BinaryKey

public BinaryKey(String key)

BinaryKey

public BinaryKey(byte[] hash)
Method Detail

keyFor

public static BinaryKey keyFor(byte[] content)

toBytes

public byte[] toBytes()
Get this binary key in the form of a byte array.

Returns:
the bytes that make up this key; never null and always a copy to prevent modification

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

compareTo

public int compareTo(BinaryKey other)
Specified by:
compareTo in interface Comparable<BinaryKey>

toString

public String toString()
Overrides:
toString in class Object

ModeShape Distribution 3.0.0.Beta4

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.