Class CharToIntMap

    • Nested Class Summary

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

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean containsKey​(char key)
      Returns true if the set contains the specified character.
      private int getIndex​(char key)  
      int getOrDefault​(char key, int defaultValue)  
      void put​(char key, int value)  
      int toDigit​(char 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

      • CharToIntMap

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

        public CharToIntMap​(int maxSize)
    • Method Detail

      • containsKey

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

        public int toDigit​(char ch)
        Description copied from interface: CharDigitSet
        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 CharDigitSet
        Parameters:
        ch - a character
        Returns:
        a value in the range 0 to Integer.MAX_VALUE.
      • put

        public void put​(char key,
                        int value)
      • getIndex

        private int getIndex​(char key)
      • getOrDefault

        public int getOrDefault​(char key,
                                int defaultValue)