|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jcoderz.guidelines.snippets.TransactionId
public final class TransactionId
This util class represents an Transaction Id with all of its features and restrictions. Instances of this class are immutable.
| Field Summary | |
|---|---|
static String |
TYPE_NAME
Name of this type. |
| Method Summary | |
|---|---|
int |
compareTo(Object o)
Compare two transaction IDs. |
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one. |
static TransactionId |
fromLong(long l)
Returns a transaction id from the given long l. |
static TransactionId |
fromString(String s)
Parses the string argument as a transaction id. |
int |
hashCode()
Compute hash code. |
long |
toLong()
Returns the transaction id as long. |
String |
toString()
Returns the transaction id as String. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String TYPE_NAME
| Method Detail |
|---|
public static TransactionId fromString(String s)
throws IllegalArgumentException
s - the String containing the transaction id.
IllegalArgumentException - if the string does not contain a
parseable transaction id.
public static TransactionId fromLong(long l)
throws IllegalArgumentException
l.
l - the long containing the transaction id.
IllegalArgumentException - if the long does not fit into a
transaction id.public String toString()
toString in class Objectpublic long toLong()
public boolean equals(Object obj)
equals in class Objectobj - the object to compare this TransactionId
against.
public int compareTo(Object o)
equals(Object).
compareTo in interface Comparableo - object with which to compare this TransactionId
o, exactly zero if they are equal, and a result
greater than zero otherwise.public int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||