java.lang.Object
com.sun.xml.fastinfoset.util.KeyIntMap
com.sun.xml.fastinfoset.util.CharArrayIntMap
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.sun.xml.fastinfoset.util.KeyIntMap
KeyIntMap.BaseEntry
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CharArrayIntMap
private CharArrayIntMap.Entry[]
protected int
Fields inherited from class com.sun.xml.fastinfoset.util.KeyIntMap
_capacity, _loadFactor, _readOnlyMapSize, _size, _threshold, DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR, MAXIMUM_CAPACITY, NOT_PRESENT
-
Constructor Summary
ConstructorsConstructorDescriptionCharArrayIntMap
(int initialCapacity) CharArrayIntMap
(int initialCapacity, float loadFactor) -
Method Summary
Modifier and TypeMethodDescriptionprivate final void
addEntry
(char[] ch, int start, int length, int hash, int value, int bucketIndex) final void
clear()
final int
get
(char[] ch, int start, int length) Method returns an index of the passed character buffer inCharArrayIntMap
.private final int
get
(char[] ch, int start, int length, int hash) final int
final int
obtainIndex
(char[] ch, int start, int length, boolean clone) Method returns an index of the passed character buffer inCharArrayIntMap
.private final void
resize
(int newCapacity) final void
setReadOnlyMap
(CharArrayIntMap readOnlyMap, boolean clear) final void
setReadOnlyMap
(KeyIntMap readOnlyMap, boolean clear) private final void
transfer
(CharArrayIntMap.Entry[] newTable)
-
Field Details
-
_readOnlyMap
-
_totalCharacterCount
protected int _totalCharacterCount -
_table
-
-
Constructor Details
-
CharArrayIntMap
public CharArrayIntMap(int initialCapacity, float loadFactor) -
CharArrayIntMap
public CharArrayIntMap(int initialCapacity) -
CharArrayIntMap
public CharArrayIntMap()
-
-
Method Details
-
clear
public final void clear() -
setReadOnlyMap
- Specified by:
setReadOnlyMap
in classKeyIntMap
-
setReadOnlyMap
-
get
public final int get(char[] ch, int start, int length) Method returns an index of the passed character buffer inCharArrayIntMap
.- Returns:
- index of character buffer in
CharArrayIntMap
, otherwise NOT_PRESENT.
-
obtainIndex
public final int obtainIndex(char[] ch, int start, int length, boolean clone) Method returns an index of the passed character buffer inCharArrayIntMap
. If character buffer is not inCharArrayIntMap
- it will be added.- Returns:
- index of character buffer in
CharArrayIntMap
, or NOT_PRESENT if character buffer was just added.
-
getTotalCharacterCount
public final int getTotalCharacterCount() -
get
private final int get(char[] ch, int start, int length, int hash) -
addEntry
private final void addEntry(char[] ch, int start, int length, int hash, int value, int bucketIndex) -
resize
private final void resize(int newCapacity) -
transfer
-