Class ByteToIntMap

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      private static class  ByteToIntMap.Node  
    • Constructor Summary

      Constructors 
      Constructor Description
      ByteToIntMap​(int maxSize)  
      ByteToIntMap​(java.util.Collection<java.lang.Character> chars)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean containsKey​(byte b)
      Returns true if the set contains the specified byte.
      private int getIndex​(byte key)  
      int getOrDefault​(byte key, int defaultValue)  
      void put​(byte key, int value)  
      int toDigit​(byte ch)
      Returns a value in the range 0 to 9 if the specified character is a digit.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ByteToIntMap

        public ByteToIntMap​(java.util.Collection<java.lang.Character> chars)
      • ByteToIntMap

        public ByteToIntMap​(int maxSize)
    • Method Detail

      • 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)