java.lang.Object
ch.randelshofer.fastdoubleparser.bte.ByteToIntMap
All Implemented Interfaces:
ByteDigitSet, ByteSet

final class ByteToIntMap extends Object implements ByteDigitSet, ByteSet
A primitive map Map<char,int>.
  • Field Details

  • Constructor Details

    • ByteToIntMap

      public ByteToIntMap(Collection<Character> chars)
    • ByteToIntMap

      public ByteToIntMap(int maxSize)
  • Method Details

    • containsKey

      public boolean containsKey(byte b)
      Description copied from interface: ByteSet
      Returns true if the set contains the specified byte.
      Specified by:
      containsKey in interface ByteSet
      Parameters:
      b - a byte
      Returns:
      true if the byte is in the set
    • toDigit

      public int toDigit(byte ch)
      Description copied from interface: ByteDigitSet
      Returns a value in the range 0 to 9 if the specified character is a digit. Otherwise, Returns a value greater than 9.
      Specified by:
      toDigit in interface ByteDigitSet
      Parameters:
      ch - a character
      Returns:
      a value in the range 0 to Integer.MAX_VALUE.
    • put

      public void put(byte key, int value)
    • getIndex

      private int getIndex(byte key)
    • getOrDefault

      public int getOrDefault(byte key, int defaultValue)