public class NARKey
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected int |
hash |
protected boolean |
hash_made |
protected byte[] |
keyvalue |
| Constructor and Description |
|---|
NARKey(byte[] value)
Use this constructor when you already have a set of
bytes that qualifies as the hash code.
|
NARKey(NAR data,
FieldKey[] fieldKeyAttrs) |
NARKey(NAR nar,
int[] attrs)
Creates a NAR Key from the given NAR, using the given
attributes to build the key.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o)
Tests for equality among 2 NARKeys.
|
int |
hashCode()
Returns the hash code of this NARKey.
|
byte[] |
toBytes()
Returns the byte array value for this key.
|
java.lang.String |
toString()
Converts this key to a String.
|
protected byte[] keyvalue
protected int hash
protected boolean hash_made
public NARKey(byte[] value)
value - Bytes, to be used as the hash codepublic NARKey(NAR nar, int[] attrs) throws java.lang.NullPointerException
nar - NAR to build the key from.attrs - Attributes to use when building the key.java.lang.NullPointerExceptionpublic byte[] toBytes()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - NARKey Object to compare.public java.lang.String toString()
toString in class java.lang.Object