Class ByteToIntMap
java.lang.Object
ch.randelshofer.fastdoubleparser.bte.ByteToIntMap
- All Implemented Interfaces:
ByteDigitSet, ByteSet
A primitive map Map<char,int>.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(byte b) Returns true if the set contains the specified byte.private intgetIndex(byte key) intgetOrDefault(byte key, int defaultValue) voidput(byte key, int value) inttoDigit(byte ch) Returns a value in the range 0 to 9 if the specified character is a digit.
-
Field Details
-
table
-
-
Constructor Details
-
ByteToIntMap
-
ByteToIntMap
public ByteToIntMap(int maxSize)
-
-
Method Details
-
containsKey
public boolean containsKey(byte b) Description copied from interface:ByteSetReturns true if the set contains the specified byte.- Specified by:
containsKeyin interfaceByteSet- Parameters:
b- a byte- Returns:
- true if the byte is in the set
-
toDigit
public int toDigit(byte ch) Description copied from interface:ByteDigitSetReturns a value in the range 0 to 9 if the specified character is a digit. Otherwise, Returns a value greater than 9.- Specified by:
toDigitin interfaceByteDigitSet- 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)
-