Interface BaseMetrics

All Superinterfaces:
org.refcodes.mixin.CharSetAccessor, org.refcodes.numerical.NumberBaseAccessor, org.refcodes.numerical.PaddingCharAccessor
All Known Implementing Classes:
BaseMetricsConfig, BaseMetricsImpl

public interface BaseMetrics
extends org.refcodes.mixin.CharSetAccessor, org.refcodes.numerical.PaddingCharAccessor, org.refcodes.numerical.NumberBaseAccessor
The BaseMetrics provide the metrics for a codec to be used by an implementation of the BaseBuilder, the BaseDecoder, the BaseEncoder or the like.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.refcodes.mixin.CharSetAccessor

    org.refcodes.mixin.CharSetAccessor.CharSetBuilder<B extends org.refcodes.mixin.CharSetAccessor.CharSetBuilder<B>>, org.refcodes.mixin.CharSetAccessor.CharSetMutator, org.refcodes.mixin.CharSetAccessor.CharSetProperty

    Nested classes/interfaces inherited from interface org.refcodes.numerical.NumberBaseAccessor

    org.refcodes.numerical.NumberBaseAccessor.NumberBaseBuilder<B extends org.refcodes.numerical.NumberBaseAccessor.NumberBaseBuilder<B>>, org.refcodes.numerical.NumberBaseAccessor.NumberBaseMutator, org.refcodes.numerical.NumberBaseAccessor.NumberBaseProperty

    Nested classes/interfaces inherited from interface org.refcodes.numerical.PaddingCharAccessor

    org.refcodes.numerical.PaddingCharAccessor.PaddingCharBuilder<B extends org.refcodes.numerical.PaddingCharAccessor.PaddingCharBuilder<B>>, org.refcodes.numerical.PaddingCharAccessor.PaddingCharMutator, org.refcodes.numerical.PaddingCharAccessor.PaddingCharProperty
  • Method Summary

    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.
    char toChar​(int aValue)
    Retrieves the (encoded) character for the (decoded) value.
    int toValue​(char aChar)
    Retrieves the (decoded) value for the (encoded) character.

    Methods inherited from interface org.refcodes.numerical.NumberBaseAccessor

    getNumberBase

    Methods inherited from interface org.refcodes.numerical.PaddingCharAccessor

    getPaddingChar
  • Method Details

    • getCharSet

      char[] getCharSet()
      Specified by:
      getCharSet in interface org.refcodes.mixin.CharSetAccessor
    • getBytesPerInt

      int getBytesPerInt()
      Number of bytes to exactly store a minimum number of digits.
      Returns:
      the bytes per int
    • getDigitsPerInt

      int getDigitsPerInt()
      Number of digits stored in an integer.
      Returns:
      the digits per int
    • getBitsPerDigit

      int getBitsPerDigit()
      Number in bits for one digit.
      Returns:
      the bits per digit
    • getDigitsPerByte

      int getDigitsPerByte()
      Number of digits required to represent a byte.
      Returns:
      the digits per byte
    • getDigitMask

      int getDigitMask()
      The digit mask is the bit-field covering just the digit's bits (starting at bit 0). Those bits in the mask are set to one which are required to represent a digit.
      Returns:
      the digit mask
    • toValue

      int toValue​(char aChar)
      Retrieves the (decoded) value for the (encoded) character.
      Parameters:
      aChar - the char
      Returns:
      the int
    • toChar

      char toChar​(int aValue)
      Retrieves the (encoded) character for the (decoded) value.
      Parameters:
      aValue - the value
      Returns:
      the char