|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.mk.model.Id
public class Id
Represents an internal identifier, uniquely identifying
a Node or a Commit.
Id is considered immutable. The byte[]
passed to Id(byte[]) must not be reused or modified, the same
applies for the byte[] returned by getBytes().
| Constructor Summary | |
|---|---|
Id(byte[] raw)
Creates a new instance based on the passed byte[]. |
|
| Method Summary | |
|---|---|
int |
compareTo(Id o)
|
boolean |
equals(Object obj)
|
static Id |
fromLong(long value)
Creates an Id instance from a long. |
static Id |
fromString(String s)
Creates an Id instance from its
string representation as returned by toString(). |
byte[] |
getBytes()
Returns the raw byte representation of this identifier. |
int |
hashCode()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Id(byte[] raw)
byte[].
The passed byte[] mus not be reused, it's assumed
to be owned by the new Id instance.
raw - the byte representation| Method Detail |
|---|
public static Id fromString(String s)
Id instance from its
string representation as returned by toString().
The following condition holds true:
Id someId = ...; assert(Id.fromString(someId.toString()).equals(someId));
s - a string representation of an Id
Id instancepublic static Id fromLong(long value)
Id instance from a long.
l - a long
Id instancepublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Objectpublic int compareTo(Id o)
compareTo in interface Comparable<Id>public byte[] getBytes()
byte[] MUST NOT be modified!
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||