public enum BaseCodecConfig extends Enum<BaseCodecConfig> implements BaseCodecMetrics
BaseCodecMetrics
to be used by a BaseCodecBuilder
, a BaseDecodeReceiver
, a
BaseEncodeSender
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.CharSetProperty
org.refcodes.numerical.PaddingCharAccessor.PaddingCharBuilder<B extends org.refcodes.numerical.PaddingCharAccessor.PaddingCharBuilder<B>>, org.refcodes.numerical.PaddingCharAccessor.PaddingCharMutator, org.refcodes.numerical.PaddingCharAccessor.PaddingCharProperty
Enum Constant and Description |
---|
BASE10 |
BASE11 |
BASE12 |
BASE13 |
BASE14 |
BASE15 |
BASE16 |
BASE17 |
BASE18 |
BASE19 |
BASE2 |
BASE20 |
BASE21 |
BASE22 |
BASE23 |
BASE24 |
BASE25 |
BASE26 |
BASE27 |
BASE28 |
BASE29 |
BASE3 |
BASE30 |
BASE31 |
BASE32 |
BASE33 |
BASE34 |
BASE35 |
BASE36 |
BASE37 |
BASE38 |
BASE39 |
BASE4 |
BASE40 |
BASE41 |
BASE42 |
BASE43 |
BASE44 |
BASE45 |
BASE46 |
BASE47 |
BASE48 |
BASE49 |
BASE5 |
BASE50 |
BASE51 |
BASE52 |
BASE53 |
BASE54 |
BASE55 |
BASE56 |
BASE57 |
BASE58 |
BASE59 |
BASE6 |
BASE60 |
BASE61 |
BASE62 |
BASE63 |
BASE64 |
BASE64_ARABIC |
BASE64_URL |
BASE7 |
BASE8 |
BASE9 |
BIN |
DEC |
HEX |
OCT |
Modifier and Type | Method and Description |
---|---|
int |
getBitsPerDigit()
Number in bits for one digit.
|
int |
getBytesPerInt()
Number of bytes to exactly store a minimum number of digits.
|
char[] |
getCharSet()
Character set to be used by the given enumeration.
|
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()
Number base as integer.
|
char |
getPaddingChar() |
static BaseCodecMetrics |
toBaseCodec(int aNumberBase) |
protected static int |
toBitsPerDigit(int aNumberBase) |
protected static int |
toBytesPerInt(int aBitsPerDigit) |
char |
toChar(int aValue)
Retrieves the (encoded) character for the (decoded) value.
|
protected static int |
toDigitMask(int aBitsPerDigit) |
protected static int |
toDigitsPerByte(int aNumberBase) |
protected static int |
toDigitsPerInt(int aBytesPerInt,
int aBitsPerDigit) |
String |
toString() |
int |
toValue(char aChar)
Retrieves the (decoded) value for the (encoded) character.
|
static BaseCodecConfig |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BaseCodecConfig[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BaseCodecConfig BASE2
public static final BaseCodecConfig BIN
public static final BaseCodecConfig BASE3
public static final BaseCodecConfig BASE4
public static final BaseCodecConfig BASE5
public static final BaseCodecConfig BASE6
public static final BaseCodecConfig BASE7
public static final BaseCodecConfig BASE8
public static final BaseCodecConfig OCT
public static final BaseCodecConfig BASE9
public static final BaseCodecConfig BASE10
public static final BaseCodecConfig DEC
public static final BaseCodecConfig BASE11
public static final BaseCodecConfig BASE12
public static final BaseCodecConfig BASE13
public static final BaseCodecConfig BASE14
public static final BaseCodecConfig BASE15
public static final BaseCodecConfig BASE16
public static final BaseCodecConfig HEX
public static final BaseCodecConfig BASE17
public static final BaseCodecConfig BASE18
public static final BaseCodecConfig BASE19
public static final BaseCodecConfig BASE20
public static final BaseCodecConfig BASE21
public static final BaseCodecConfig BASE22
public static final BaseCodecConfig BASE23
public static final BaseCodecConfig BASE24
public static final BaseCodecConfig BASE25
public static final BaseCodecConfig BASE26
public static final BaseCodecConfig BASE27
public static final BaseCodecConfig BASE28
public static final BaseCodecConfig BASE29
public static final BaseCodecConfig BASE30
public static final BaseCodecConfig BASE31
public static final BaseCodecConfig BASE32
public static final BaseCodecConfig BASE33
public static final BaseCodecConfig BASE34
public static final BaseCodecConfig BASE35
public static final BaseCodecConfig BASE36
public static final BaseCodecConfig BASE37
public static final BaseCodecConfig BASE38
public static final BaseCodecConfig BASE39
public static final BaseCodecConfig BASE40
public static final BaseCodecConfig BASE41
public static final BaseCodecConfig BASE42
public static final BaseCodecConfig BASE43
public static final BaseCodecConfig BASE44
public static final BaseCodecConfig BASE45
public static final BaseCodecConfig BASE46
public static final BaseCodecConfig BASE47
public static final BaseCodecConfig BASE48
public static final BaseCodecConfig BASE49
public static final BaseCodecConfig BASE50
public static final BaseCodecConfig BASE51
public static final BaseCodecConfig BASE52
public static final BaseCodecConfig BASE53
public static final BaseCodecConfig BASE54
public static final BaseCodecConfig BASE55
public static final BaseCodecConfig BASE56
public static final BaseCodecConfig BASE57
public static final BaseCodecConfig BASE58
public static final BaseCodecConfig BASE59
public static final BaseCodecConfig BASE60
public static final BaseCodecConfig BASE61
public static final BaseCodecConfig BASE62
public static final BaseCodecConfig BASE63
public static final BaseCodecConfig BASE64
public static final BaseCodecConfig BASE64_ARABIC
public static final BaseCodecConfig BASE64_URL
public static BaseCodecConfig[] values()
for (BaseCodecConfig c : BaseCodecConfig.values()) System.out.println(c);
public static BaseCodecConfig 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 BaseCodecMetrics
public char[] getCharSet()
getCharSet
in interface BaseCodecMetrics
getCharSet
in interface org.refcodes.mixin.CharSetAccessor
public int getBytesPerInt()
getBytesPerInt
in interface BaseCodecMetrics
public int getDigitsPerInt()
getDigitsPerInt
in interface BaseCodecMetrics
public int getBitsPerDigit()
getBitsPerDigit
in interface BaseCodecMetrics
public int getDigitsPerByte()
getDigitsPerByte
in interface BaseCodecMetrics
public int getDigitMask()
getDigitMask
in interface BaseCodecMetrics
public static BaseCodecMetrics toBaseCodec(int aNumberBase)
public int toValue(char aChar)
BaseCodecMetrics
toValue
in interface BaseCodecMetrics
public char toChar(int aValue)
BaseCodecMetrics
toChar
in interface BaseCodecMetrics
public char getPaddingChar()
getPaddingChar
in interface org.refcodes.numerical.PaddingCharAccessor
public String toString()
toString
in class Enum<BaseCodecConfig>
protected static int toDigitMask(int aBitsPerDigit)
protected static int toBitsPerDigit(int aNumberBase)
protected static int toDigitsPerInt(int aBytesPerInt, int aBitsPerDigit)
protected static int toDigitsPerByte(int aNumberBase)
protected static int toBytesPerInt(int aBitsPerDigit)
Copyright © 2016. All rights reserved.