|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.math.util.OpenIntToFieldHashMap<T>
T - the type of the field elementspublic class OpenIntToFieldHashMap<T extends FieldElement<T>>
Open addressed map from int to FieldElement.
This class provides a dedicated map from integers to FieldElements with a
much smaller memory overhead than standard java.util.Map.
This class is not synchronized. The specialized iterators returned by
iterator() are fail-fast: they throw a
ConcurrentModificationException when they detect the map has been
modified during iteration.
| Nested Class Summary | |
|---|---|
class |
OpenIntToFieldHashMap.Iterator
Iterator class for the map. |
| Field Summary | |
|---|---|
protected static byte |
FREE
Status indicator for free table entries. |
protected static byte |
FULL
Status indicator for full table entries. |
protected static byte |
REMOVED
Status indicator for removed table entries. |
| Constructor Summary | |
|---|---|
OpenIntToFieldHashMap(Field<T> field)
Build an empty map with default size and using zero for missing entries. |
|
OpenIntToFieldHashMap(Field<T> field,
int expectedSize)
Build an empty map with specified size and using zero for missing entries. |
|
OpenIntToFieldHashMap(Field<T> field,
int expectedSize,
T missingEntries)
Build an empty map with specified size. |
|
OpenIntToFieldHashMap(Field<T> field,
T missingEntries)
Build an empty map with default size |
|
OpenIntToFieldHashMap(OpenIntToFieldHashMap<T> source)
Copy constructor. |
|
| Method Summary | |
|---|---|
boolean |
containsKey(int key)
Check if a value is associated with a key. |
T |
get(int key)
Get the stored value associated with the given key |
OpenIntToFieldHashMap.Iterator |
iterator()
Get an iterator over map elements. |
T |
put(int key,
T value)
Put a value associated with a key in the map. |
T |
remove(int key)
Remove the value associated with a key. |
int |
size()
Get the number of elements stored in the map. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final byte FREE
protected static final byte FULL
protected static final byte REMOVED
| Constructor Detail |
|---|
public OpenIntToFieldHashMap(Field<T> field)
field - field to which the elements belong
public OpenIntToFieldHashMap(Field<T> field,
T missingEntries)
field - field to which the elements belongmissingEntries - value to return when a missing entry is fetched
public OpenIntToFieldHashMap(Field<T> field,
int expectedSize)
field - field to which the elements belongexpectedSize - expected number of elements in the map
public OpenIntToFieldHashMap(Field<T> field,
int expectedSize,
T missingEntries)
field - field to which the elements belongexpectedSize - expected number of elements in the mapmissingEntries - value to return when a missing entry is fetchedpublic OpenIntToFieldHashMap(OpenIntToFieldHashMap<T> source)
source - map to copy| Method Detail |
|---|
public T get(int key)
key - key associated with the data
public boolean containsKey(int key)
key - key to check
public OpenIntToFieldHashMap.Iterator iterator()
The specialized iterators returned are fail-fast: they throw a
ConcurrentModificationException when they detect the map
has been modified during iteration.
public int size()
public T remove(int key)
key - key to which the value is associated
public T put(int key,
T value)
key - key to which value is associatedvalue - value to put in the map
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||