Package com.helger.commons
Class CGlobal
java.lang.Object
com.helger.commons.CGlobal
A class declaring system wide constants. Its main use is giving a semantic
meaning to constant values.
- Author:
- Philip Helger
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BigDecimalThe BigDecimal representation of 100static final BigDecimalThe BigDecimal representation of 1000static final BigDecimalThe BigDecimal representation of 2static final BigDecimalThe BigDecimal representation of 3static final BigDecimalThe BigDecimal representation of 4static final BigDecimalThe BigDecimal representation of 5static final BigDecimalThe BigDecimal representation of 50static final BigDecimalThe BigDecimal representation of 6static final BigDecimalThe BigDecimal representation of 7static final BigDecimalThe BigDecimal representation of 8static final BigDecimalThe BigDecimal representation of 9static final BigDecimalThe BigDecimal for the largest possible byte value (127)static final BigDecimalThe BigDecimal for the largest possible character value (65_535)static final BigDecimalThe BigDecimal for the largest possible double value (1.7976931348623157E308)static final BigDecimalThe BigDecimal for the largest possible float value (3.4028235E38)static final BigDecimalThe BigDecimal for the largest possible int value (2_147_483_647)static final BigDecimalThe BigDecimal for the largest possible long value (9_223_372_036_854_775_807)static final BigDecimalThe BigDecimal for the largest possible short value (32_767)static final BigDecimalThe BigDecimal for the smallest possible byte value (-128)static final BigDecimalThe BigDecimal for the smallest possible character value (0)static final BigDecimalThe BigDecimal for the smallest possible double value (4.9E-324)static final BigDecimalThe BigDecimal for the smallest possible float value (1.4E-45)static final BigDecimalThe BigDecimal for the smallest possible int value (-2_147_483_648)static final BigDecimalThe BigDecimal for the smallest possible long value (-9_223_372_036_854_775_808)static final BigDecimalThe BigDecimal for the smallest possible short value (-32_768)static final BigDecimalThe BigDecimal representation of -1static final BigIntegerThe BigInteger representation of 100static final BigIntegerThe BigInteger representation of 1000static final BigIntegerThe BigInteger representation of 2static final BigIntegerThe BigInteger representation of 3static final BigIntegerThe BigInteger representation of 4static final BigIntegerThe BigInteger representation of 5static final BigIntegerThe BigInteger representation of 50static final BigIntegerThe BigInteger representation of 6static final BigIntegerThe BigInteger representation of 7static final BigIntegerThe BigInteger representation of 8static final BigIntegerThe BigInteger representation of 9static final BigIntegerThe BigInteger for the largest possible byte value (127)static final BigIntegerThe BigInteger for the largest possible character value (65_535)static final BigIntegerThe BigInteger for the largest possible int value (2_147_483_647)static final BigIntegerThe BigInteger for the largest possible long value (9_223_372_036_854_775_807)static final BigIntegerThe BigInteger for the largest possible short value (32_767)static final BigIntegerThe BigInteger for the smallest possible byte value (-128)static final BigIntegerThe BigInteger for the smallest possible character value (0)static final BigIntegerThe BigInteger for the smallest possible int value (-2_147_483_648)static final BigIntegerThe BigInteger for the smallest possible long value (-9_223_372_036_854_775_808)static final BigIntegerThe BigInteger for the smallest possible short value (-32_768)static final BigIntegerThe BigInteger representation of -1static final intValue if a bit is not set (0).static final intValue if a bit is set (1).static final intNumber of bits in a byte.static final intNumber of bits in an int. 32 bits.static final intNumber of bits in a long. 64 bits.static final intNumber of bits in a short. 16 bits.static final longBytes per gigabyte (1_073_741_824, 2^30).static final intBytes per kilobyte (1024, 2^10).static final longBytes per kilobyte (1024, 2^10).static final intBytes per megabyte (1_048_576, 2^20).static final longBytes per petabyte (1_125_899_906_842_624, 2^50).static final longBytes per terabyte (1_099_511_627_776, 2^40).static final floatCentimeter per inch (2.54)static final booleanDefault boolean value (false)static final BooleanBoolean value ofDEFAULT_BOOLEAN(false)static final byteDefault byte value (0)static final ByteByte value ofDEFAULT_BYTE(0)static final charDefault char value (0)static final CharacterCharacter value ofDEFAULT_CHAR(0)static final doubleDefault double value (0)static final DoubleDouble value ofDEFAULT_DOUBLE(0)static final floatDefault float value (0)static final FloatFloat value ofDEFAULT_FLOAT(0)static final intDefault int value (0)static final IntegerInteger value ofDEFAULT_INT(0)static final longDefault long value (0)static final LongLong value ofDEFAULT_LONG(0)static final shortDefault short value (0)static final ShortShort value ofDEFAULT_SHORT(0)static final intRadix for hexadecimal values (16).static final intHours in a day (24).static final charRepresents an illegal character (\0).static final doubleRepresents an illegal double (Double.NaN).static final floatRepresents an illegal float (Float.NaN).static final intRepresents an illegal unsigned integer (-1).static final longRepresents an illegal unsigned long (-1).static final shortRepresents an illegal unsigned short (-1).static final intconstant for an indefinite number of entries (-1).static final intThe maximum number that can be represented by a single byte (0xff - 255).static final longMicro seconds per millisecond (1_000).static final longMicro seconds per second (1_000_000).static final longMilliseconds per hour (3_600_000).static final longMilliseconds per second (60_000).static final longMilliseconds per second (1_000).static final intMinutes in a day (1440).static final intMinutes in an hour (60).static final floatMillimeter per inch (25.4)static final longNanoseconds per hour (3_600_000_000_000).static final longNanoseconds per microsecond (1_000).static final longNanoseconds per millisecond (1_000_000).static final longNanoseconds per minute (60_000_000_000).static final longNanoseconds per second (1_000_000_000).static final intSeconds in a day (86_400).static final intSeconds in an hour (3_600).static final intSeconds in a minute (60). -
Method Summary
-
Field Details
-
BITS_PER_BYTE
public static final int BITS_PER_BYTENumber of bits in a byte. Always 8 bits.- See Also:
-
BITS_PER_SHORT
public static final int BITS_PER_SHORTNumber of bits in a short. 16 bits.- See Also:
-
BITS_PER_INT
public static final int BITS_PER_INTNumber of bits in an int. 32 bits.- See Also:
-
BITS_PER_LONG
public static final int BITS_PER_LONGNumber of bits in a long. 64 bits.- See Also:
-
BIT_SET
public static final int BIT_SETValue if a bit is set (1).- See Also:
-
BIT_NOT_SET
public static final int BIT_NOT_SETValue if a bit is not set (0).- See Also:
-
MAX_BYTE_VALUE
public static final int MAX_BYTE_VALUEThe maximum number that can be represented by a single byte (0xff - 255).- See Also:
-
HEX_RADIX
public static final int HEX_RADIXRadix for hexadecimal values (16).- See Also:
-
ILLEGAL_USHORT
public static final short ILLEGAL_USHORTRepresents an illegal unsigned short (-1).- See Also:
-
ILLEGAL_UINT
public static final int ILLEGAL_UINTRepresents an illegal unsigned integer (-1).- See Also:
-
ILLEGAL_ULONG
public static final long ILLEGAL_ULONGRepresents an illegal unsigned long (-1).- See Also:
-
ILLEGAL_FLOAT
public static final float ILLEGAL_FLOATRepresents an illegal float (Float.NaN).- See Also:
-
ILLEGAL_DOUBLE
public static final double ILLEGAL_DOUBLERepresents an illegal double (Double.NaN).- See Also:
-
ILLEGAL_CHAR
public static final char ILLEGAL_CHARRepresents an illegal character (\0).- See Also:
-
INDEFINITE_ENTRIES
public static final int INDEFINITE_ENTRIESconstant for an indefinite number of entries (-1).- See Also:
-
BYTES_PER_KILOBYTE
public static final int BYTES_PER_KILOBYTEBytes per kilobyte (1024, 2^10).- See Also:
-
BYTES_PER_KILOBYTE_LONG
public static final long BYTES_PER_KILOBYTE_LONGBytes per kilobyte (1024, 2^10).- See Also:
-
BYTES_PER_MEGABYTE
public static final int BYTES_PER_MEGABYTEBytes per megabyte (1_048_576, 2^20).- See Also:
-
BYTES_PER_GIGABYTE
public static final long BYTES_PER_GIGABYTEBytes per gigabyte (1_073_741_824, 2^30).- See Also:
-
BYTES_PER_TERABYTE
public static final long BYTES_PER_TERABYTEBytes per terabyte (1_099_511_627_776, 2^40). Needs to be a long and not an int!- See Also:
-
BYTES_PER_PETABYTE
public static final long BYTES_PER_PETABYTEBytes per petabyte (1_125_899_906_842_624, 2^50). Needs to be a long and not an int!- See Also:
-
HOURS_PER_DAY
public static final int HOURS_PER_DAYHours in a day (24).- See Also:
-
MINUTES_PER_HOUR
public static final int MINUTES_PER_HOURMinutes in an hour (60).- See Also:
-
MINUTES_PER_DAY
public static final int MINUTES_PER_DAYMinutes in a day (1440).- See Also:
-
SECONDS_PER_MINUTE
public static final int SECONDS_PER_MINUTESeconds in a minute (60).- See Also:
-
SECONDS_PER_HOUR
public static final int SECONDS_PER_HOURSeconds in an hour (3_600).- See Also:
-
SECONDS_PER_DAY
public static final int SECONDS_PER_DAYSeconds in a day (86_400).- See Also:
-
MILLISECONDS_PER_SECOND
public static final long MILLISECONDS_PER_SECONDMilliseconds per second (1_000).- See Also:
-
MILLISECONDS_PER_MINUTE
public static final long MILLISECONDS_PER_MINUTEMilliseconds per second (60_000).- See Also:
-
MILLISECONDS_PER_HOUR
public static final long MILLISECONDS_PER_HOURMilliseconds per hour (3_600_000).- See Also:
-
MICROSECONDS_PER_MILLISECOND
public static final long MICROSECONDS_PER_MILLISECONDMicro seconds per millisecond (1_000).- See Also:
-
MICROSECONDS_PER_SECOND
public static final long MICROSECONDS_PER_SECONDMicro seconds per second (1_000_000).- See Also:
-
NANOSECONDS_PER_MICROSECOND
public static final long NANOSECONDS_PER_MICROSECONDNanoseconds per microsecond (1_000).- See Also:
-
NANOSECONDS_PER_MILLISECOND
public static final long NANOSECONDS_PER_MILLISECONDNanoseconds per millisecond (1_000_000).- See Also:
-
NANOSECONDS_PER_SECOND
public static final long NANOSECONDS_PER_SECONDNanoseconds per second (1_000_000_000).- See Also:
-
NANOSECONDS_PER_MINUTE
public static final long NANOSECONDS_PER_MINUTENanoseconds per minute (60_000_000_000).- See Also:
-
NANOSECONDS_PER_HOUR
public static final long NANOSECONDS_PER_HOURNanoseconds per hour (3_600_000_000_000).- See Also:
-
BIGINT_MAX_BYTE
The BigInteger for the largest possible byte value (127) -
BIGINT_MIN_BYTE
The BigInteger for the smallest possible byte value (-128) -
BIGINT_MAX_CHAR
The BigInteger for the largest possible character value (65_535) -
BIGINT_MIN_CHAR
The BigInteger for the smallest possible character value (0) -
BIGINT_MAX_SHORT
The BigInteger for the largest possible short value (32_767) -
BIGINT_MIN_SHORT
The BigInteger for the smallest possible short value (-32_768) -
BIGINT_MAX_INT
The BigInteger for the largest possible int value (2_147_483_647) -
BIGINT_MIN_INT
The BigInteger for the smallest possible int value (-2_147_483_648) -
BIGINT_MAX_LONG
The BigInteger for the largest possible long value (9_223_372_036_854_775_807) -
BIGINT_MIN_LONG
The BigInteger for the smallest possible long value (-9_223_372_036_854_775_808) -
BIGINT_MINUS_ONE
The BigInteger representation of -1 -
BIGINT_2
The BigInteger representation of 2 -
BIGINT_3
The BigInteger representation of 3 -
BIGINT_4
The BigInteger representation of 4 -
BIGINT_5
The BigInteger representation of 5 -
BIGINT_6
The BigInteger representation of 6 -
BIGINT_7
The BigInteger representation of 7 -
BIGINT_8
The BigInteger representation of 8 -
BIGINT_9
The BigInteger representation of 9 -
BIGINT_50
The BigInteger representation of 50 -
BIGINT_100
The BigInteger representation of 100 -
BIGINT_1000
The BigInteger representation of 1000 -
BIGDEC_MAX_BYTE
The BigDecimal for the largest possible byte value (127) -
BIGDEC_MIN_BYTE
The BigDecimal for the smallest possible byte value (-128) -
BIGDEC_MAX_CHAR
The BigDecimal for the largest possible character value (65_535) -
BIGDEC_MIN_CHAR
The BigDecimal for the smallest possible character value (0) -
BIGDEC_MAX_SHORT
The BigDecimal for the largest possible short value (32_767) -
BIGDEC_MIN_SHORT
The BigDecimal for the smallest possible short value (-32_768) -
BIGDEC_MAX_INT
The BigDecimal for the largest possible int value (2_147_483_647) -
BIGDEC_MIN_INT
The BigDecimal for the smallest possible int value (-2_147_483_648) -
BIGDEC_MAX_LONG
The BigDecimal for the largest possible long value (9_223_372_036_854_775_807) -
BIGDEC_MIN_LONG
The BigDecimal for the smallest possible long value (-9_223_372_036_854_775_808) -
BIGDEC_MAX_FLOAT
The BigDecimal for the largest possible float value (3.4028235E38) -
BIGDEC_MIN_FLOAT
The BigDecimal for the smallest possible float value (1.4E-45) -
BIGDEC_MAX_DOUBLE
The BigDecimal for the largest possible double value (1.7976931348623157E308) -
BIGDEC_MIN_DOUBLE
The BigDecimal for the smallest possible double value (4.9E-324) -
BIGDEC_MINUS_ONE
The BigDecimal representation of -1 -
BIGDEC_2
The BigDecimal representation of 2 -
BIGDEC_3
The BigDecimal representation of 3 -
BIGDEC_4
The BigDecimal representation of 4 -
BIGDEC_5
The BigDecimal representation of 5 -
BIGDEC_6
The BigDecimal representation of 6 -
BIGDEC_7
The BigDecimal representation of 7 -
BIGDEC_8
The BigDecimal representation of 8 -
BIGDEC_9
The BigDecimal representation of 9 -
BIGDEC_50
The BigDecimal representation of 50 -
BIGDEC_100
The BigDecimal representation of 100 -
BIGDEC_1000
The BigDecimal representation of 1000 -
CM_PER_INCH
public static final float CM_PER_INCHCentimeter per inch (2.54)- See Also:
-
MM_PER_INCH
public static final float MM_PER_INCHMillimeter per inch (25.4)- See Also:
-
DEFAULT_BOOLEAN
public static final boolean DEFAULT_BOOLEANDefault boolean value (false)- See Also:
-
DEFAULT_BYTE
public static final byte DEFAULT_BYTEDefault byte value (0)- See Also:
-
DEFAULT_CHAR
public static final char DEFAULT_CHARDefault char value (0)- See Also:
-
DEFAULT_DOUBLE
public static final double DEFAULT_DOUBLEDefault double value (0)- See Also:
-
DEFAULT_FLOAT
public static final float DEFAULT_FLOATDefault float value (0)- See Also:
-
DEFAULT_INT
public static final int DEFAULT_INTDefault int value (0)- See Also:
-
DEFAULT_LONG
public static final long DEFAULT_LONGDefault long value (0)- See Also:
-
DEFAULT_SHORT
public static final short DEFAULT_SHORTDefault short value (0)- See Also:
-
DEFAULT_BOOLEAN_OBJ
Boolean value ofDEFAULT_BOOLEAN(false) -
DEFAULT_BYTE_OBJ
Byte value ofDEFAULT_BYTE(0) -
DEFAULT_CHAR_OBJ
Character value ofDEFAULT_CHAR(0) -
DEFAULT_DOUBLE_OBJ
Double value ofDEFAULT_DOUBLE(0) -
DEFAULT_FLOAT_OBJ
Float value ofDEFAULT_FLOAT(0) -
DEFAULT_INT_OBJ
Integer value ofDEFAULT_INT(0) -
DEFAULT_LONG_OBJ
Long value ofDEFAULT_LONG(0) -
DEFAULT_SHORT_OBJ
Short value ofDEFAULT_SHORT(0)
-