public class BaseCodecMetricsImpl extends Object implements BaseCodecMetrics
BaseCodecMetrics
implementation for playing around with your own
configuration. You may use a template as one from BaseCodecConfig
and
tweak some attributes as you wish.Constructor and Description |
---|
BaseCodecMetricsImpl(BaseCodecMetrics aBaseCodecMetrics) |
BaseCodecMetricsImpl(int aNumberBase,
int aBitsPerDigit,
int aDigitsPerByte,
int aDigitsPerInt,
int aBytesPerInt,
char[] aCharSet) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
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.
|
int |
hashCode() |
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.
|
public BaseCodecMetricsImpl(int aNumberBase, int aBitsPerDigit, int aDigitsPerByte, int aDigitsPerInt, int aBytesPerInt, char[] aCharSet)
public BaseCodecMetricsImpl(BaseCodecMetrics aBaseCodecMetrics)
public int getNumberBase()
getNumberBase
in interface BaseCodecMetrics
public char[] getCharSet()
getCharSet
in interface BaseCodecMetrics
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 int toValue(char aChar)
BaseCodecMetrics
toValue
in interface BaseCodecMetrics
public char toChar(int aValue)
BaseCodecMetrics
toChar
in interface BaseCodecMetrics
Copyright © 2016. All rights reserved.