- java.lang.Object
-
- com.sun.xml.fastinfoset.util.KeyIntMap
-
- com.sun.xml.fastinfoset.util.CharArrayIntMap
-
public class CharArrayIntMap extends KeyIntMap
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
CharArrayIntMap.Entry
-
Nested classes/interfaces inherited from class com.sun.xml.fastinfoset.util.KeyIntMap
KeyIntMap.BaseEntry
-
-
Field Summary
Fields Modifier and Type Field Description private CharArrayIntMap
_readOnlyMap
private CharArrayIntMap.Entry[]
_table
protected int
_totalCharacterCount
-
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
Constructors Constructor Description CharArrayIntMap()
CharArrayIntMap(int initialCapacity)
CharArrayIntMap(int initialCapacity, float loadFactor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addEntry(char[] ch, int start, int length, int hash, int value, int bucketIndex)
void
clear()
int
get(char[] ch, int start, int length)
Method returns an index of the passed character buffer inCharArrayIntMap
.private int
get(char[] ch, int start, int length, int hash)
int
getTotalCharacterCount()
int
obtainIndex(char[] ch, int start, int length, boolean clone)
Method returns an index of the passed character buffer inCharArrayIntMap
.private void
resize(int newCapacity)
void
setReadOnlyMap(CharArrayIntMap readOnlyMap, boolean clear)
void
setReadOnlyMap(KeyIntMap readOnlyMap, boolean clear)
private void
transfer(CharArrayIntMap.Entry[] newTable)
-
-
-
Field Detail
-
_readOnlyMap
private CharArrayIntMap _readOnlyMap
-
_totalCharacterCount
protected int _totalCharacterCount
-
_table
private CharArrayIntMap.Entry[] _table
-
-
Method Detail
-
setReadOnlyMap
public final void setReadOnlyMap(KeyIntMap readOnlyMap, boolean clear)
- Specified by:
setReadOnlyMap
in classKeyIntMap
-
setReadOnlyMap
public final void setReadOnlyMap(CharArrayIntMap readOnlyMap, boolean clear)
-
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
private final void transfer(CharArrayIntMap.Entry[] newTable)
-
-