|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.at4j.support.lang.SignedLong
public class SignedLong
This class represents a signed long value (i.e. a plain long value).
If the Long class had not been declared final, this
class would probably have extended it.
Signed long objects are created by calling any of the static creation methods on this class.
Instances of this class are immutable.
UnsignedLong,
SignedInteger| Field Summary | |
|---|---|
static SignedLong |
ONE
This constant represents the value 1. |
static SignedLong |
ZERO
This constant represents the value 0. |
| Method Summary | |
|---|---|
int |
compareTo(SignedLong l2)
|
boolean |
equals(Object o)
|
static SignedLong |
fromBigEndianByteArray(byte[] barr)
Create a signed long value from an eight bytes long big-endian byte array. |
static SignedLong |
fromLittleEndianByteArray(byte[] barr)
Create a signed long value from an eight bytes long little-endian byte array. |
byte[] |
getBigEndianByteArray()
Get the signed long value represented as a big-endian byte array (eight bytes long). |
byte[] |
getLittleEndianByteArray()
Get the signed long value represented as a little-endian byte array (eight bytes long). |
int |
hashCode()
|
long |
longValue()
Get the signed long value. |
String |
toString()
|
static SignedLong |
valueOf(long value)
Create a new signed long value. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final SignedLong ZERO
0.
public static final SignedLong ONE
1.
| Method Detail |
|---|
public static SignedLong valueOf(long value)
value - The long value.
public long longValue()
public byte[] getBigEndianByteArray()
fromBigEndianByteArray(byte[]),
getLittleEndianByteArray()
public static SignedLong fromBigEndianByteArray(byte[] barr)
throws IllegalArgumentException
barr - The byte array. It must be eight bytes long.
IllegalArgumentException - If the byte array is not eight bytes
long.getBigEndianByteArray(),
fromLittleEndianByteArray(byte[])public byte[] getLittleEndianByteArray()
getBigEndianByteArray(),
fromBigEndianByteArray(byte[])
public static SignedLong fromLittleEndianByteArray(byte[] barr)
throws IllegalArgumentException
barr - The byte array. It must be eight bytes long.
IllegalArgumentException - If the byte array is not eight bytes
long.getLittleEndianByteArray(),
fromBigEndianByteArray(byte[])public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int compareTo(SignedLong l2)
compareTo in interface Comparable<SignedLong>public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||