|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ivmaidns.util.JavaConsts
public final class JavaConsts
Class defining Java-specific constants. This class contains such the specific fundamental constants of Java platform (defined by 'The Java Language Specification') as the sizes, masks and limits for all Java numeric primitive types.
UnsignedInt
,
UnsignedLong
,
PseudoRandom
,
ByteVector
,
CharVector
,
DoubleVector
,
FloatVector
,
IntVector
,
LongVector
,
ShortVector
Field Summary | |
---|---|
static int |
BYTE_MASK
The unsigned int mask of byte type. |
static int |
BYTE_SIZE
The size of byte primitive type in bits. |
static int |
CHAR_LENGTH
The length of char primitive type (in bytes). |
static int |
CHAR_MASK
The unsigned int mask of char type. |
static int |
CHAR_SIZE
The size of char primitive type in bits. |
static long |
DOUBLE_EXP_MASK
The unsigned long mask of the exponent part of
double type. |
static int |
DOUBLE_EXP_SIZE
The size of exponent of double primitive type in
bits. |
static long |
DOUBLE_M_MASK
The unsigned long mask of the mantissa part of
double type. |
static int |
DOUBLE_M_SIZE
The size of mantissa of double primitive type in
bits. |
static int |
FLOAT_EXP_MASK
The unsigned int mask of the exponent part of
float type. |
static int |
FLOAT_EXP_SIZE
The size of exponent of float primitive type in
bits. |
static int |
FLOAT_M_MASK
The unsigned int mask of the mantissa part of
float type. |
static int |
FLOAT_M_SIZE
The size of mantissa of float primitive type in
bits. |
static int |
GOLD_MEDIAN
Unsigned 'Gold Median' constant. |
static int |
INT_LENGTH
The length of int primitive type (in bytes). |
static long |
INT_LMASK
The unsigned long mask of int type. |
static int |
INT_SIZE
The size of int primitive type in bits. |
static long |
LONG_GOLD_MEDIAN
Unsigned 'Gold Median' constant for long type. |
static int |
LONG_LENGTH
The length of long primitive type (in bytes). |
static int |
LONG_SIZE
The size of long primitive type in bits. |
static int |
MAX_BYTE
The largest byte value. |
static int |
MAX_INT
The largest int value. |
static long |
MAX_LONG
The largest long value. |
static int |
MAX_SHORT
The largest short value. |
static int |
MIN_BYTE
The smallest byte value. |
static int |
MIN_INT
The smallest int value. |
static long |
MIN_LONG
The smallest long value. |
static int |
MIN_SHORT
The smallest short value. |
static int |
SHORT_LENGTH
The length of short primitive type (in bytes). |
static int |
SHORT_MASK
The unsigned int mask of short type. |
static int |
SHORT_SIZE
The size of short primitive type in bits. |
Method Summary |
---|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BYTE_SIZE
byte
primitive type in bits.
This is a fundamental constant of Java (8
by the
standard). Its value is the same as the result of execution of
value = 1; do { size++; } while ((value *= 2) != 0);
statement, where value is of byte
type.
BYTE_MASK
,
MIN_BYTE
,
MAX_BYTE
,
CHAR_SIZE
,
SHORT_SIZE
,
INT_SIZE
,
LONG_SIZE
,
Constant Field Valuespublic static final int CHAR_SIZE
char
primitive type in bits.
This is a fundamental constant of Java (16
by the
standard). Its value is the same as the result of execution of
value = 1; do { size++; } while ((value *= 2) != 0);
statement, where value is of char
type.
Important notes: this size is not less than
BYTE_SIZE
; see also the Unicode standard.
CHAR_LENGTH
,
CHAR_MASK
,
BYTE_SIZE
,
SHORT_SIZE
,
INT_SIZE
,
LONG_SIZE
,
Constant Field Valuespublic static final int SHORT_SIZE
short
primitive type in bits.
This is a fundamental constant of Java (16
by the
standard). Its value is the same as the result of execution of
value = 1; do { size++; } while ((value *= 2) != 0);
statement, where value is of short
type.
Important notes: this size is not less than
BYTE_SIZE
.
SHORT_LENGTH
,
SHORT_MASK
,
MIN_SHORT
,
MAX_SHORT
,
BYTE_SIZE
,
CHAR_SIZE
,
INT_SIZE
,
LONG_SIZE
,
Constant Field Valuespublic static final int FLOAT_M_SIZE
float
primitive type in
bits.
This is a fundamental constant of Java (23
by the
standard). Its value is the same as the result of execution of
value = 1; while ((value *= 2) + 1 != value) size++;
statement, where value is of float
type.
Important notes: this size is less than INT_SIZE
;
the whole size of float
type is the same as the size
of int
type.
FLOAT_M_MASK
,
FLOAT_EXP_SIZE
,
DOUBLE_M_SIZE
,
INT_SIZE
,
Constant Field Valuespublic static final int INT_SIZE
int
primitive type in bits.
This is a fundamental constant of Java (32
by the
standard). Its value is the same as the result of execution of
value = 1; do { size++; } while ((value *= 2) != 0);
statement, where value is of int
type.
Important notes: this size is not less than
SHORT_SIZE
.
INT_LENGTH
,
INT_LMASK
,
MIN_INT
,
MAX_INT
,
BYTE_SIZE
,
CHAR_SIZE
,
SHORT_SIZE
,
LONG_SIZE
,
FLOAT_M_SIZE
,
Constant Field Valuespublic static final int DOUBLE_M_SIZE
double
primitive type in
bits.
This is a fundamental constant of Java (52
by the
standard). Its value is the same as the result of execution of
value = 1; while ((value *= 2) + 1 != value) size++;
statement, where value is of double
type.
Important notes: this size is less than LONG_SIZE
and not less than FLOAT_M_SIZE
; the whole size of
double
type is the same as the size of
long
.
DOUBLE_M_MASK
,
DOUBLE_EXP_SIZE
,
FLOAT_M_SIZE
,
LONG_SIZE
,
Constant Field Valuespublic static final int LONG_SIZE
long
primitive type in bits.
This is a fundamental constant of Java (64
by the
standard). Its value is the same as the result of execution of
value = 1; do { size++; } while ((value *= 2) != 0);
statement, where value is of long
type.
Important notes: this size is not less than
INT_SIZE
.
LONG_LENGTH
,
MIN_LONG
,
MAX_LONG
,
BYTE_SIZE
,
SHORT_SIZE
,
INT_SIZE
,
DOUBLE_M_SIZE
,
Constant Field Valuespublic static final int GOLD_MEDIAN
(sqrt(5) - 1) * (MAX_INT + 1)
rounded to the
nearest prime. 'Gold Median' is used for various digest
calculations ('Multiplicative' method) as follows:
(((value ^ seed) * GOLD_MEDIAN) >>> shift)
, where
shift is equal to
(INT_SIZE - resultSize)
.
LONG_GOLD_MEDIAN
,
INT_SIZE
,
INT_LMASK
,
MAX_INT
,
Constant Field Valuespublic static final long LONG_GOLD_MEDIAN
long
type.
This constant is the calculated long
integer value
of (sqrt(5) - 1) * (MAX_LONG + 1)
rounded to the
nearest prime. 'Gold Median' is used for various digest
calculations ('Multiplicative' method) as follows:
(((value ^ seed) * LONG_GOLD_MEDIAN) >>> shift)
,
where shift is equal to
(LONG_SIZE - resultSize)
.
GOLD_MEDIAN
,
LONG_SIZE
,
MAX_LONG
,
Constant Field Valuespublic static final int FLOAT_EXP_SIZE
float
primitive type in
bits.
FLOAT_EXP_MASK
,
FLOAT_M_SIZE
,
DOUBLE_EXP_SIZE
,
INT_SIZE
,
Constant Field Valuespublic static final int DOUBLE_EXP_SIZE
double
primitive type in
bits.
DOUBLE_EXP_MASK
,
DOUBLE_M_SIZE
,
FLOAT_EXP_SIZE
,
LONG_SIZE
,
Constant Field Valuespublic static final int CHAR_LENGTH
char
primitive type (in bytes).
CHAR_SIZE
,
CHAR_MASK
,
SHORT_LENGTH
,
INT_LENGTH
,
LONG_LENGTH
,
Constant Field Valuespublic static final int SHORT_LENGTH
short
primitive type (in bytes).
SHORT_SIZE
,
SHORT_MASK
,
MIN_SHORT
,
MAX_SHORT
,
CHAR_LENGTH
,
INT_LENGTH
,
LONG_LENGTH
,
Constant Field Valuespublic static final int INT_LENGTH
int
primitive type (in bytes).
INT_SIZE
,
INT_LMASK
,
MIN_INT
,
MAX_INT
,
CHAR_LENGTH
,
SHORT_LENGTH
,
LONG_LENGTH
,
Constant Field Valuespublic static final int LONG_LENGTH
long
primitive type (in bytes).
LONG_SIZE
,
MIN_LONG
,
MAX_LONG
,
CHAR_LENGTH
,
SHORT_LENGTH
,
INT_LENGTH
,
Constant Field Valuespublic static final int BYTE_MASK
int
mask of byte
type.
BYTE_SIZE
,
MIN_BYTE
,
MAX_BYTE
,
CHAR_MASK
,
SHORT_MASK
,
INT_LMASK
,
Constant Field Valuespublic static final int CHAR_MASK
int
mask of char
type.
CHAR_SIZE
,
CHAR_LENGTH
,
BYTE_MASK
,
SHORT_MASK
,
INT_LMASK
,
Constant Field Valuespublic static final int SHORT_MASK
int
mask of short
type.
SHORT_SIZE
,
SHORT_LENGTH
,
MIN_SHORT
,
MAX_SHORT
,
BYTE_MASK
,
CHAR_MASK
,
INT_LMASK
,
Constant Field Valuespublic static final long INT_LMASK
long
mask of int
type.
INT_SIZE
,
INT_LENGTH
,
MIN_INT
,
MAX_INT
,
BYTE_MASK
,
CHAR_MASK
,
SHORT_MASK
,
FLOAT_M_MASK
,
FLOAT_EXP_MASK
,
Constant Field Valuespublic static final int FLOAT_M_MASK
int
mask of the mantissa part of
float
type.
FLOAT_M_SIZE
,
FLOAT_EXP_MASK
,
DOUBLE_M_MASK
,
INT_SIZE
,
INT_LENGTH
,
INT_LMASK
,
Constant Field Valuespublic static final int FLOAT_EXP_MASK
int
mask of the exponent part of
float
type.
FLOAT_EXP_SIZE
,
FLOAT_M_MASK
,
DOUBLE_EXP_MASK
,
INT_SIZE
,
INT_LENGTH
,
INT_LMASK
,
Constant Field Valuespublic static final long DOUBLE_M_MASK
long
mask of the mantissa part of
double
type.
DOUBLE_M_SIZE
,
DOUBLE_EXP_MASK
,
FLOAT_M_MASK
,
LONG_SIZE
,
LONG_LENGTH
,
Constant Field Valuespublic static final long DOUBLE_EXP_MASK
long
mask of the exponent part of
double
type.
DOUBLE_EXP_SIZE
,
DOUBLE_M_MASK
,
FLOAT_EXP_MASK
,
LONG_SIZE
,
LONG_LENGTH
,
Constant Field Valuespublic static final int MIN_BYTE
byte
value.
BYTE_SIZE
,
BYTE_MASK
,
MAX_BYTE
,
MIN_SHORT
,
MIN_INT
,
MIN_LONG
,
Constant Field Valuespublic static final int MAX_BYTE
byte
value.
BYTE_SIZE
,
BYTE_MASK
,
MIN_BYTE
,
MAX_SHORT
,
MAX_INT
,
MAX_LONG
,
Constant Field Valuespublic static final int MIN_SHORT
short
value.
SHORT_SIZE
,
SHORT_LENGTH
,
SHORT_MASK
,
MAX_SHORT
,
MIN_BYTE
,
MIN_INT
,
MIN_LONG
,
Constant Field Valuespublic static final int MAX_SHORT
short
value.
SHORT_SIZE
,
SHORT_LENGTH
,
SHORT_MASK
,
MIN_SHORT
,
MAX_BYTE
,
MAX_INT
,
MAX_LONG
,
Constant Field Valuespublic static final int MIN_INT
int
value.
INT_SIZE
,
INT_LENGTH
,
INT_LMASK
,
MAX_INT
,
MIN_BYTE
,
MIN_SHORT
,
MIN_LONG
,
Constant Field Valuespublic static final int MAX_INT
int
value.
INT_SIZE
,
INT_LENGTH
,
INT_LMASK
,
MIN_INT
,
MAX_BYTE
,
MAX_SHORT
,
MAX_LONG
,
Constant Field Valuespublic static final long MIN_LONG
long
value.
LONG_SIZE
,
LONG_LENGTH
,
MAX_LONG
,
MIN_BYTE
,
MIN_SHORT
,
MIN_INT
,
Constant Field Valuespublic static final long MAX_LONG
long
value.
LONG_SIZE
,
LONG_LENGTH
,
MIN_LONG
,
MAX_BYTE
,
MAX_SHORT
,
MAX_INT
,
Constant Field Values
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |