Serializable, Comparable<BaseConfig>, BaseMetrics, org.refcodes.mixin.CharSetAccessor, org.refcodes.numerical.NumberBaseAccessor, org.refcodes.numerical.PaddingCharAccessorpublic enum BaseConfig extends Enum<BaseConfig> implements BaseMetrics
BaseMetrics to be
used by a BaseBuilder, a BaseDecoder, a BaseEncoder
or the like..org.refcodes.mixin.CharSetAccessor.CharSetBuilder<B extends org.refcodes.mixin.CharSetAccessor.CharSetBuilder<B>>, org.refcodes.mixin.CharSetAccessor.CharSetMutator, org.refcodes.mixin.CharSetAccessor.CharSetPropertyorg.refcodes.numerical.NumberBaseAccessor.NumberBaseBuilder<B extends org.refcodes.numerical.NumberBaseAccessor.NumberBaseBuilder<B>>, org.refcodes.numerical.NumberBaseAccessor.NumberBaseMutator, org.refcodes.numerical.NumberBaseAccessor.NumberBasePropertyorg.refcodes.numerical.PaddingCharAccessor.PaddingCharBuilder<B extends org.refcodes.numerical.PaddingCharAccessor.PaddingCharBuilder<B>>, org.refcodes.numerical.PaddingCharAccessor.PaddingCharMutator, org.refcodes.numerical.PaddingCharAccessor.PaddingCharProperty| Enum Constant | Description |
|---|---|
BASE16 |
|
BASE2 |
|
BASE32 |
|
BASE4 |
|
BASE64 |
|
BASE64_ARABIC |
|
BASE64_URL |
|
BASE8 |
|
BINARY |
|
ENCODED_AS_NUMBER |
Use this encoding when you want to retrieve a "valid" number *not*
beginning with a zero "0" and just consisting of the numbers 0 to 9.
|
HEXADECIMAL |
|
OCTAL |
| Modifier and Type | Method | Description |
|---|---|---|
int |
getBitsPerDigit() |
Number in bits for one digit.
|
int |
getBytesPerInt() |
Number of bytes to exactly store a minimum number of digits.
|
char[] |
getCharSet() |
|
int |
getDigitMask() |
The digit mask is the bit-field covering just the digit's bits (starting
at bit 0).
|
int |
getDigitsPerByte() |
Number of digits required to represent a byte.
|
int |
getDigitsPerInt() |
Number of digits stored in an integer.
|
int |
getNumberBase() |
|
char |
getPaddingChar() |
|
static BaseMetrics |
toBaseCodec(int aNumberBase) |
To base codec.
|
char |
toChar(int aValue) |
Retrieves the (encoded) character for the (decoded) value.
|
String |
toString() |
|
int |
toValue(char aChar) |
Retrieves the (decoded) value for the (encoded) character.
|
static BaseConfig |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static BaseConfig[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BaseConfig BASE2
public static final BaseConfig BINARY
public static final BaseConfig BASE4
public static final BaseConfig BASE8
public static final BaseConfig OCTAL
public static final BaseConfig ENCODED_AS_NUMBER
public static final BaseConfig BASE16
public static final BaseConfig HEXADECIMAL
public static final BaseConfig BASE32
public static final BaseConfig BASE64
public static final BaseConfig BASE64_ARABIC
public static final BaseConfig BASE64_URL
public static BaseConfig[] values()
for (BaseConfig c : BaseConfig.values()) System.out.println(c);
public static BaseConfig valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic int getNumberBase()
getNumberBase in interface org.refcodes.numerical.NumberBaseAccessorpublic char[] getCharSet()
getCharSet in interface BaseMetricsgetCharSet in interface org.refcodes.mixin.CharSetAccessorpublic int getBytesPerInt()
getBytesPerInt in interface BaseMetricspublic int getDigitsPerInt()
getDigitsPerInt in interface BaseMetricspublic int getBitsPerDigit()
getBitsPerDigit in interface BaseMetricspublic int getDigitsPerByte()
getDigitsPerByte in interface BaseMetricspublic int getDigitMask()
getDigitMask in interface BaseMetricspublic static BaseMetrics toBaseCodec(int aNumberBase)
aNumberBase - the number basepublic int toValue(char aChar)
toValue in interface BaseMetricsaChar - the charpublic char toChar(int aValue)
toChar in interface BaseMetricsaValue - the valuepublic char getPaddingChar()
getPaddingChar in interface org.refcodes.numerical.PaddingCharAccessorpublic String toString()
toString in class Enum<BaseConfig>Copyright © 2018. All rights reserved.