|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jboss.util.Primitives
Primitive utilities.
| Constructor Summary | |
Primitives()
|
|
| Method Summary | |
static boolean |
equals(byte[] a,
byte[] b)
Test the equality of two byte arrays. |
static boolean |
equals(byte[] a,
int abegin,
byte[] b,
int bbegin,
int length)
Test the equality of a given sub-section of two byte arrays. |
static boolean |
equals(double a,
double b)
Test the equality of two doubles by converting their values into IEEE 754 floating-point "double format" long values. |
static boolean |
equals(float a,
float b)
Test the equality of two doubles by converting their values into IEEE 754 floating-point "single precision" bit layouts. |
static int |
toInt(long value)
Safely convert a long into a int value. |
static Boolean |
valueOf(boolean value)
Get a Boolean from a boolean, equivalent to the java 1.4 method Boolean.valueOf(boolean) |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Primitives()
| Method Detail |
public static Boolean valueOf(boolean value)
value - the boolean
public static boolean equals(double a,
double b)
a - Double to check equality with.b - Double to check equality with.
public static boolean equals(float a,
float b)
a - Float to check equality with.b - Float to check equality with.
public static boolean equals(byte[] a,
int abegin,
byte[] b,
int bbegin,
int length)
a - The first byte array.abegin - The begining index of the first byte array.b - The second byte array.bbegin - The begining index of the second byte array.length - The length of the sub-section.
public static boolean equals(byte[] a,
byte[] b)
a - The first byte array.b - The second byte array.
public static int toInt(long value)
throws DataConversionException
If value is > Integer.MAX_VALUE or < Integer.MIN_VALUE then an exception will be thrown, else the value is cast down to an int.
value - The long value to convert.
DataConversionException - Could not safely convert the value.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||