Package com.helger.commons
Class CGlobal
- java.lang.Object
-
- com.helger.commons.CGlobal
-
@Immutable public final class CGlobal extends Object
A class declaring system wide constants. Its main use is giving a semantic meaning to constant values.- Author:
- Philip Helger
-
-
Field Summary
Fields Modifier and Type Field Description static BigDecimalBIGDEC_100The BigDecimal representation of 100static BigDecimalBIGDEC_1000The BigDecimal representation of 1000static BigDecimalBIGDEC_2The BigDecimal representation of 2static BigDecimalBIGDEC_3The BigDecimal representation of 3static BigDecimalBIGDEC_4The BigDecimal representation of 4static BigDecimalBIGDEC_5The BigDecimal representation of 5static BigDecimalBIGDEC_50The BigDecimal representation of 50static BigDecimalBIGDEC_6The BigDecimal representation of 6static BigDecimalBIGDEC_7The BigDecimal representation of 7static BigDecimalBIGDEC_8The BigDecimal representation of 8static BigDecimalBIGDEC_9The BigDecimal representation of 9static BigDecimalBIGDEC_MAX_BYTEThe BigDecimal for the largest possible byte value (127)static BigDecimalBIGDEC_MAX_CHARThe BigDecimal for the largest possible character value (65_535)static BigDecimalBIGDEC_MAX_DOUBLEThe BigDecimal for the largest possible double value (1.7976931348623157E308)static BigDecimalBIGDEC_MAX_FLOATThe BigDecimal for the largest possible float value (3.4028235E38)static BigDecimalBIGDEC_MAX_INTThe BigDecimal for the largest possible int value (2_147_483_647)static BigDecimalBIGDEC_MAX_LONGThe BigDecimal for the largest possible long value (9_223_372_036_854_775_807)static BigDecimalBIGDEC_MAX_SHORTThe BigDecimal for the largest possible short value (32_767)static BigDecimalBIGDEC_MIN_BYTEThe BigDecimal for the smallest possible byte value (-128)static BigDecimalBIGDEC_MIN_CHARThe BigDecimal for the smallest possible character value (0)static BigDecimalBIGDEC_MIN_DOUBLEThe BigDecimal for the smallest possible double value (4.9E-324)static BigDecimalBIGDEC_MIN_FLOATThe BigDecimal for the smallest possible float value (1.4E-45)static BigDecimalBIGDEC_MIN_INTThe BigDecimal for the smallest possible int value (-2_147_483_648)static BigDecimalBIGDEC_MIN_LONGThe BigDecimal for the smallest possible long value (-9_223_372_036_854_775_808)static BigDecimalBIGDEC_MIN_SHORTThe BigDecimal for the smallest possible short value (-32_768)static BigDecimalBIGDEC_MINUS_ONEThe BigDecimal representation of -1static BigIntegerBIGINT_100The BigInteger representation of 100static BigIntegerBIGINT_1000The BigInteger representation of 1000static BigIntegerBIGINT_2The BigInteger representation of 2static BigIntegerBIGINT_3The BigInteger representation of 3static BigIntegerBIGINT_4The BigInteger representation of 4static BigIntegerBIGINT_5The BigInteger representation of 5static BigIntegerBIGINT_50The BigInteger representation of 50static BigIntegerBIGINT_6The BigInteger representation of 6static BigIntegerBIGINT_7The BigInteger representation of 7static BigIntegerBIGINT_8The BigInteger representation of 8static BigIntegerBIGINT_9The BigInteger representation of 9static BigIntegerBIGINT_MAX_BYTEThe BigInteger for the largest possible byte value (127)static BigIntegerBIGINT_MAX_CHARThe BigInteger for the largest possible character value (65_535)static BigIntegerBIGINT_MAX_INTThe BigInteger for the largest possible int value (2_147_483_647)static BigIntegerBIGINT_MAX_LONGThe BigInteger for the largest possible long value (9_223_372_036_854_775_807)static BigIntegerBIGINT_MAX_SHORTThe BigInteger for the largest possible short value (32_767)static BigIntegerBIGINT_MIN_BYTEThe BigInteger for the smallest possible byte value (-128)static BigIntegerBIGINT_MIN_CHARThe BigInteger for the smallest possible character value (0)static BigIntegerBIGINT_MIN_INTThe BigInteger for the smallest possible int value (-2_147_483_648)static BigIntegerBIGINT_MIN_LONGThe BigInteger for the smallest possible long value (-9_223_372_036_854_775_808)static BigIntegerBIGINT_MIN_SHORTThe BigInteger for the smallest possible short value (-32_768)static BigIntegerBIGINT_MINUS_ONEThe BigInteger representation of -1static intBIT_NOT_SETValue if a bit is not set (0).static intBIT_SETValue if a bit is set (1).static intBITS_PER_BYTENumber of bits in a byte.static intBITS_PER_INTNumber of bits in an int. 32 bits.static intBITS_PER_LONGNumber of bits in a long. 64 bits.static intBITS_PER_SHORTNumber of bits in a short. 16 bits.static longBYTES_PER_GIGABYTEBytes per gigabyte (1_073_741_824, 2^30).static intBYTES_PER_KILOBYTEBytes per kilobyte (1024, 2^10).static longBYTES_PER_KILOBYTE_LONGBytes per kilobyte (1024, 2^10).static intBYTES_PER_MEGABYTEBytes per megabyte (1_048_576, 2^20).static longBYTES_PER_PETABYTEBytes per petabyte (1_125_899_906_842_624, 2^50).static longBYTES_PER_TERABYTEBytes per terabyte (1_099_511_627_776, 2^40).static floatCM_PER_INCHCentimeter per inch (2.54)static booleanDEFAULT_BOOLEANDefault boolean value (false)static BooleanDEFAULT_BOOLEAN_OBJBoolean value ofDEFAULT_BOOLEAN(false)static byteDEFAULT_BYTEDefault byte value (0)static ByteDEFAULT_BYTE_OBJByte value ofDEFAULT_BYTE(0)static charDEFAULT_CHARDefault char value (0)static CharacterDEFAULT_CHAR_OBJCharacter value ofDEFAULT_CHAR(0)static doubleDEFAULT_DOUBLEDefault double value (0)static DoubleDEFAULT_DOUBLE_OBJDouble value ofDEFAULT_DOUBLE(0)static floatDEFAULT_FLOATDefault float value (0)static FloatDEFAULT_FLOAT_OBJFloat value ofDEFAULT_FLOAT(0)static intDEFAULT_INTDefault int value (0)static IntegerDEFAULT_INT_OBJInteger value ofDEFAULT_INT(0)static longDEFAULT_LONGDefault long value (0)static LongDEFAULT_LONG_OBJLong value ofDEFAULT_LONG(0)static shortDEFAULT_SHORTDefault short value (0)static ShortDEFAULT_SHORT_OBJShort value ofDEFAULT_SHORT(0)static intHEX_RADIXRadix for hexadecimal values (16).static intHOURS_PER_DAYHours in a day (24).static charILLEGAL_CHARRepresents an illegal character (\0).static doubleILLEGAL_DOUBLERepresents an illegal double (Double.NaN).static floatILLEGAL_FLOATRepresents an illegal float (Float.NaN).static intILLEGAL_UINTRepresents an illegal unsigned integer (-1).static longILLEGAL_ULONGRepresents an illegal unsigned long (-1).static shortILLEGAL_USHORTRepresents an illegal unsigned short (-1).static intINDEFINITE_ENTRIESconstant for an indefinite number of entries (-1).static intMAX_BYTE_VALUEThe maximum number that can be represented by a single byte (0xff - 255).static longMICROSECONDS_PER_MILLISECONDMicro seconds per millisecond (1_000).static longMICROSECONDS_PER_SECONDMicro seconds per second (1_000_000).static longMILLISECONDS_PER_HOURMilliseconds per hour (3_600_000).static longMILLISECONDS_PER_MINUTEMilliseconds per second (60_000).static longMILLISECONDS_PER_SECONDMilliseconds per second (1_000).static intMINUTES_PER_DAYMinutes in a day (1440).static intMINUTES_PER_HOURMinutes in an hour (60).static floatMM_PER_INCHMillimeter per inch (25.4)static longNANOSECONDS_PER_HOURNanoseconds per hour (3_600_000_000_000).static longNANOSECONDS_PER_MICROSECONDNanoseconds per microsecond (1_000).static longNANOSECONDS_PER_MILLISECONDNanoseconds per millisecond (1_000_000).static longNANOSECONDS_PER_MINUTENanoseconds per minute (60_000_000_000).static longNANOSECONDS_PER_SECONDNanoseconds per second (1_000_000_000).static intSECONDS_PER_DAYSeconds in a day (86_400).static intSECONDS_PER_HOURSeconds in an hour (3_600).static intSECONDS_PER_MINUTESeconds in a minute (60).
-
-
-
Field Detail
-
BITS_PER_BYTE
public static final int BITS_PER_BYTE
Number of bits in a byte. Always 8 bits.- See Also:
- Constant Field Values
-
BITS_PER_SHORT
public static final int BITS_PER_SHORT
Number of bits in a short. 16 bits.- See Also:
- Constant Field Values
-
BITS_PER_INT
public static final int BITS_PER_INT
Number of bits in an int. 32 bits.- See Also:
- Constant Field Values
-
BITS_PER_LONG
public static final int BITS_PER_LONG
Number of bits in a long. 64 bits.- See Also:
- Constant Field Values
-
BIT_SET
public static final int BIT_SET
Value if a bit is set (1).- See Also:
- Constant Field Values
-
BIT_NOT_SET
public static final int BIT_NOT_SET
Value if a bit is not set (0).- See Also:
- Constant Field Values
-
MAX_BYTE_VALUE
public static final int MAX_BYTE_VALUE
The maximum number that can be represented by a single byte (0xff - 255).- See Also:
- Constant Field Values
-
HEX_RADIX
public static final int HEX_RADIX
Radix for hexadecimal values (16).- See Also:
- Constant Field Values
-
ILLEGAL_USHORT
public static final short ILLEGAL_USHORT
Represents an illegal unsigned short (-1).- See Also:
- Constant Field Values
-
ILLEGAL_UINT
public static final int ILLEGAL_UINT
Represents an illegal unsigned integer (-1).- See Also:
- Constant Field Values
-
ILLEGAL_ULONG
public static final long ILLEGAL_ULONG
Represents an illegal unsigned long (-1).- See Also:
- Constant Field Values
-
ILLEGAL_FLOAT
public static final float ILLEGAL_FLOAT
Represents an illegal float (Float.NaN).- See Also:
- Constant Field Values
-
ILLEGAL_DOUBLE
public static final double ILLEGAL_DOUBLE
Represents an illegal double (Double.NaN).- See Also:
- Constant Field Values
-
ILLEGAL_CHAR
public static final char ILLEGAL_CHAR
Represents an illegal character (\0).- See Also:
- Constant Field Values
-
INDEFINITE_ENTRIES
public static final int INDEFINITE_ENTRIES
constant for an indefinite number of entries (-1).- See Also:
- Constant Field Values
-
BYTES_PER_KILOBYTE
public static final int BYTES_PER_KILOBYTE
Bytes per kilobyte (1024, 2^10).- See Also:
- Constant Field Values
-
BYTES_PER_KILOBYTE_LONG
public static final long BYTES_PER_KILOBYTE_LONG
Bytes per kilobyte (1024, 2^10).- See Also:
- Constant Field Values
-
BYTES_PER_MEGABYTE
public static final int BYTES_PER_MEGABYTE
Bytes per megabyte (1_048_576, 2^20).- See Also:
- Constant Field Values
-
BYTES_PER_GIGABYTE
public static final long BYTES_PER_GIGABYTE
Bytes per gigabyte (1_073_741_824, 2^30).- See Also:
- Constant Field Values
-
BYTES_PER_TERABYTE
public static final long BYTES_PER_TERABYTE
Bytes per terabyte (1_099_511_627_776, 2^40). Needs to be a long and not an int!- See Also:
- Constant Field Values
-
BYTES_PER_PETABYTE
public static final long BYTES_PER_PETABYTE
Bytes per petabyte (1_125_899_906_842_624, 2^50). Needs to be a long and not an int!- See Also:
- Constant Field Values
-
HOURS_PER_DAY
public static final int HOURS_PER_DAY
Hours in a day (24).- See Also:
- Constant Field Values
-
MINUTES_PER_HOUR
public static final int MINUTES_PER_HOUR
Minutes in an hour (60).- See Also:
- Constant Field Values
-
MINUTES_PER_DAY
public static final int MINUTES_PER_DAY
Minutes in a day (1440).- See Also:
- Constant Field Values
-
SECONDS_PER_MINUTE
public static final int SECONDS_PER_MINUTE
Seconds in a minute (60).- See Also:
- Constant Field Values
-
SECONDS_PER_HOUR
public static final int SECONDS_PER_HOUR
Seconds in an hour (3_600).- See Also:
- Constant Field Values
-
SECONDS_PER_DAY
public static final int SECONDS_PER_DAY
Seconds in a day (86_400).- See Also:
- Constant Field Values
-
MILLISECONDS_PER_SECOND
public static final long MILLISECONDS_PER_SECOND
Milliseconds per second (1_000).- See Also:
- Constant Field Values
-
MILLISECONDS_PER_MINUTE
public static final long MILLISECONDS_PER_MINUTE
Milliseconds per second (60_000).- See Also:
- Constant Field Values
-
MILLISECONDS_PER_HOUR
public static final long MILLISECONDS_PER_HOUR
Milliseconds per hour (3_600_000).- See Also:
- Constant Field Values
-
MICROSECONDS_PER_MILLISECOND
public static final long MICROSECONDS_PER_MILLISECOND
Micro seconds per millisecond (1_000).- See Also:
- Constant Field Values
-
MICROSECONDS_PER_SECOND
public static final long MICROSECONDS_PER_SECOND
Micro seconds per second (1_000_000).- See Also:
- Constant Field Values
-
NANOSECONDS_PER_MICROSECOND
public static final long NANOSECONDS_PER_MICROSECOND
Nanoseconds per microsecond (1_000).- See Also:
- Constant Field Values
-
NANOSECONDS_PER_MILLISECOND
public static final long NANOSECONDS_PER_MILLISECOND
Nanoseconds per millisecond (1_000_000).- See Also:
- Constant Field Values
-
NANOSECONDS_PER_SECOND
public static final long NANOSECONDS_PER_SECOND
Nanoseconds per second (1_000_000_000).- See Also:
- Constant Field Values
-
NANOSECONDS_PER_MINUTE
public static final long NANOSECONDS_PER_MINUTE
Nanoseconds per minute (60_000_000_000).- See Also:
- Constant Field Values
-
NANOSECONDS_PER_HOUR
public static final long NANOSECONDS_PER_HOUR
Nanoseconds per hour (3_600_000_000_000).- See Also:
- Constant Field Values
-
BIGINT_MAX_BYTE
public static final BigInteger BIGINT_MAX_BYTE
The BigInteger for the largest possible byte value (127)
-
BIGINT_MIN_BYTE
public static final BigInteger BIGINT_MIN_BYTE
The BigInteger for the smallest possible byte value (-128)
-
BIGINT_MAX_CHAR
public static final BigInteger BIGINT_MAX_CHAR
The BigInteger for the largest possible character value (65_535)
-
BIGINT_MIN_CHAR
public static final BigInteger BIGINT_MIN_CHAR
The BigInteger for the smallest possible character value (0)
-
BIGINT_MAX_SHORT
public static final BigInteger BIGINT_MAX_SHORT
The BigInteger for the largest possible short value (32_767)
-
BIGINT_MIN_SHORT
public static final BigInteger BIGINT_MIN_SHORT
The BigInteger for the smallest possible short value (-32_768)
-
BIGINT_MAX_INT
public static final BigInteger BIGINT_MAX_INT
The BigInteger for the largest possible int value (2_147_483_647)
-
BIGINT_MIN_INT
public static final BigInteger BIGINT_MIN_INT
The BigInteger for the smallest possible int value (-2_147_483_648)
-
BIGINT_MAX_LONG
public static final BigInteger BIGINT_MAX_LONG
The BigInteger for the largest possible long value (9_223_372_036_854_775_807)
-
BIGINT_MIN_LONG
public static final BigInteger BIGINT_MIN_LONG
The BigInteger for the smallest possible long value (-9_223_372_036_854_775_808)
-
BIGINT_MINUS_ONE
public static final BigInteger BIGINT_MINUS_ONE
The BigInteger representation of -1
-
BIGINT_2
public static final BigInteger BIGINT_2
The BigInteger representation of 2
-
BIGINT_3
public static final BigInteger BIGINT_3
The BigInteger representation of 3
-
BIGINT_4
public static final BigInteger BIGINT_4
The BigInteger representation of 4
-
BIGINT_5
public static final BigInteger BIGINT_5
The BigInteger representation of 5
-
BIGINT_6
public static final BigInteger BIGINT_6
The BigInteger representation of 6
-
BIGINT_7
public static final BigInteger BIGINT_7
The BigInteger representation of 7
-
BIGINT_8
public static final BigInteger BIGINT_8
The BigInteger representation of 8
-
BIGINT_9
public static final BigInteger BIGINT_9
The BigInteger representation of 9
-
BIGINT_50
public static final BigInteger BIGINT_50
The BigInteger representation of 50
-
BIGINT_100
public static final BigInteger BIGINT_100
The BigInteger representation of 100
-
BIGINT_1000
public static final BigInteger BIGINT_1000
The BigInteger representation of 1000
-
BIGDEC_MAX_BYTE
public static final BigDecimal BIGDEC_MAX_BYTE
The BigDecimal for the largest possible byte value (127)
-
BIGDEC_MIN_BYTE
public static final BigDecimal BIGDEC_MIN_BYTE
The BigDecimal for the smallest possible byte value (-128)
-
BIGDEC_MAX_CHAR
public static final BigDecimal BIGDEC_MAX_CHAR
The BigDecimal for the largest possible character value (65_535)
-
BIGDEC_MIN_CHAR
public static final BigDecimal BIGDEC_MIN_CHAR
The BigDecimal for the smallest possible character value (0)
-
BIGDEC_MAX_SHORT
public static final BigDecimal BIGDEC_MAX_SHORT
The BigDecimal for the largest possible short value (32_767)
-
BIGDEC_MIN_SHORT
public static final BigDecimal BIGDEC_MIN_SHORT
The BigDecimal for the smallest possible short value (-32_768)
-
BIGDEC_MAX_INT
public static final BigDecimal BIGDEC_MAX_INT
The BigDecimal for the largest possible int value (2_147_483_647)
-
BIGDEC_MIN_INT
public static final BigDecimal BIGDEC_MIN_INT
The BigDecimal for the smallest possible int value (-2_147_483_648)
-
BIGDEC_MAX_LONG
public static final BigDecimal BIGDEC_MAX_LONG
The BigDecimal for the largest possible long value (9_223_372_036_854_775_807)
-
BIGDEC_MIN_LONG
public static final BigDecimal BIGDEC_MIN_LONG
The BigDecimal for the smallest possible long value (-9_223_372_036_854_775_808)
-
BIGDEC_MAX_FLOAT
public static final BigDecimal BIGDEC_MAX_FLOAT
The BigDecimal for the largest possible float value (3.4028235E38)
-
BIGDEC_MIN_FLOAT
public static final BigDecimal BIGDEC_MIN_FLOAT
The BigDecimal for the smallest possible float value (1.4E-45)
-
BIGDEC_MAX_DOUBLE
public static final BigDecimal BIGDEC_MAX_DOUBLE
The BigDecimal for the largest possible double value (1.7976931348623157E308)
-
BIGDEC_MIN_DOUBLE
public static final BigDecimal BIGDEC_MIN_DOUBLE
The BigDecimal for the smallest possible double value (4.9E-324)
-
BIGDEC_MINUS_ONE
public static final BigDecimal BIGDEC_MINUS_ONE
The BigDecimal representation of -1
-
BIGDEC_2
public static final BigDecimal BIGDEC_2
The BigDecimal representation of 2
-
BIGDEC_3
public static final BigDecimal BIGDEC_3
The BigDecimal representation of 3
-
BIGDEC_4
public static final BigDecimal BIGDEC_4
The BigDecimal representation of 4
-
BIGDEC_5
public static final BigDecimal BIGDEC_5
The BigDecimal representation of 5
-
BIGDEC_6
public static final BigDecimal BIGDEC_6
The BigDecimal representation of 6
-
BIGDEC_7
public static final BigDecimal BIGDEC_7
The BigDecimal representation of 7
-
BIGDEC_8
public static final BigDecimal BIGDEC_8
The BigDecimal representation of 8
-
BIGDEC_9
public static final BigDecimal BIGDEC_9
The BigDecimal representation of 9
-
BIGDEC_50
public static final BigDecimal BIGDEC_50
The BigDecimal representation of 50
-
BIGDEC_100
public static final BigDecimal BIGDEC_100
The BigDecimal representation of 100
-
BIGDEC_1000
public static final BigDecimal BIGDEC_1000
The BigDecimal representation of 1000
-
CM_PER_INCH
public static final float CM_PER_INCH
Centimeter per inch (2.54)- See Also:
- Constant Field Values
-
MM_PER_INCH
public static final float MM_PER_INCH
Millimeter per inch (25.4)- See Also:
- Constant Field Values
-
DEFAULT_BOOLEAN
public static final boolean DEFAULT_BOOLEAN
Default boolean value (false)- See Also:
- Constant Field Values
-
DEFAULT_BYTE
public static final byte DEFAULT_BYTE
Default byte value (0)- See Also:
- Constant Field Values
-
DEFAULT_CHAR
public static final char DEFAULT_CHAR
Default char value (0)- See Also:
- Constant Field Values
-
DEFAULT_DOUBLE
public static final double DEFAULT_DOUBLE
Default double value (0)- See Also:
- Constant Field Values
-
DEFAULT_FLOAT
public static final float DEFAULT_FLOAT
Default float value (0)- See Also:
- Constant Field Values
-
DEFAULT_INT
public static final int DEFAULT_INT
Default int value (0)- See Also:
- Constant Field Values
-
DEFAULT_LONG
public static final long DEFAULT_LONG
Default long value (0)- See Also:
- Constant Field Values
-
DEFAULT_SHORT
public static final short DEFAULT_SHORT
Default short value (0)- See Also:
- Constant Field Values
-
DEFAULT_BOOLEAN_OBJ
public static final Boolean DEFAULT_BOOLEAN_OBJ
Boolean value ofDEFAULT_BOOLEAN(false)
-
DEFAULT_BYTE_OBJ
public static final Byte DEFAULT_BYTE_OBJ
Byte value ofDEFAULT_BYTE(0)
-
DEFAULT_CHAR_OBJ
public static final Character DEFAULT_CHAR_OBJ
Character value ofDEFAULT_CHAR(0)
-
DEFAULT_DOUBLE_OBJ
public static final Double DEFAULT_DOUBLE_OBJ
Double value ofDEFAULT_DOUBLE(0)
-
DEFAULT_FLOAT_OBJ
public static final Float DEFAULT_FLOAT_OBJ
Float value ofDEFAULT_FLOAT(0)
-
DEFAULT_INT_OBJ
public static final Integer DEFAULT_INT_OBJ
Integer value ofDEFAULT_INT(0)
-
DEFAULT_LONG_OBJ
public static final Long DEFAULT_LONG_OBJ
Long value ofDEFAULT_LONG(0)
-
DEFAULT_SHORT_OBJ
public static final Short DEFAULT_SHORT_OBJ
Short value ofDEFAULT_SHORT(0)
-
-