public class CharArrayIntMap extends KeyIntMap
Modifier and Type | Class and Description |
---|---|
(package private) static class |
CharArrayIntMap.Entry |
KeyIntMap.BaseEntry
Modifier and Type | Field and Description |
---|---|
private CharArrayIntMap |
_readOnlyMap |
private CharArrayIntMap.Entry[] |
_table |
protected int |
_totalCharacterCount |
_capacity, _loadFactor, _readOnlyMapSize, _size, _threshold, DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR, MAXIMUM_CAPACITY, NOT_PRESENT
Constructor and Description |
---|
CharArrayIntMap() |
CharArrayIntMap(int initialCapacity) |
CharArrayIntMap(int initialCapacity,
float loadFactor) |
Modifier and Type | Method and 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 in
CharArrayIntMap . |
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 in
CharArrayIntMap . |
private void |
resize(int newCapacity) |
void |
setReadOnlyMap(CharArrayIntMap readOnlyMap,
boolean clear) |
void |
setReadOnlyMap(KeyIntMap readOnlyMap,
boolean clear) |
private void |
transfer(CharArrayIntMap.Entry[] newTable) |
private CharArrayIntMap _readOnlyMap
protected int _totalCharacterCount
private CharArrayIntMap.Entry[] _table
public CharArrayIntMap(int initialCapacity, float loadFactor)
public CharArrayIntMap(int initialCapacity)
public CharArrayIntMap()
public final void setReadOnlyMap(KeyIntMap readOnlyMap, boolean clear)
setReadOnlyMap
in class KeyIntMap
public final void setReadOnlyMap(CharArrayIntMap readOnlyMap, boolean clear)
public final int get(char[] ch, int start, int length)
CharArrayIntMap
.CharArrayIntMap
,
otherwise NOT_PRESENT.public final int obtainIndex(char[] ch, int start, int length, boolean clone)
CharArrayIntMap
. If character buffer is not in
CharArrayIntMap
- it will be added.CharArrayIntMap
, or
NOT_PRESENT if character buffer was just added.public final int getTotalCharacterCount()
private final int get(char[] ch, int start, int length, int hash)
private final void addEntry(char[] ch, int start, int length, int hash, int value, int bucketIndex)
private final void resize(int newCapacity)
private final void transfer(CharArrayIntMap.Entry[] newTable)