|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.axiondb.engine.rowcollection.IntHashMap
public class IntHashMap
Int key and Object value Map, this does not implement java.util.Map interface and has limited Map like API. Does not implement EntrySet and and KeySet, tather it just retunds their iterator.
Nested Class Summary | |
---|---|
static class |
IntHashMap.Entry
This class represents a IntHashMap entry. |
class |
IntHashMap.EntryIterator
|
class |
IntHashMap.ValueIterator
|
protected class |
IntHashMap.Values
|
Constructor Summary | |
---|---|
IntHashMap()
Creates an IntHashMap of small initial capacity. |
|
IntHashMap(int capacity)
Creates an IntHashMap of specified initial capacity. |
|
IntHashMap(IntHashMap map)
Creates a IntHashMap containing the specified entries, in the order they are returned by the map's iterator. |
Method Summary | |
---|---|
protected void |
addEntry(int hash,
int key,
java.lang.Object value)
Adds a new entry for the specified key and value. |
void |
clear()
Removes all mappings from this IntHashMap . |
boolean |
containsKey(int key)
Indicates if this IntHashMap contains a mapping for the specified key. |
boolean |
containsValue(java.lang.Object value)
Indicates if this IntHashMap maps one or more keys to the specified value. |
IntHashMap.EntryIterator |
entryIterator()
|
boolean |
equals(java.lang.Object obj)
Compares the specified object with this IntHashMap for equality. |
java.lang.Object |
get(int key)
Returns the value to which this IntHashMap maps the specified key. |
IntHashMap.Entry |
getEntry(int key)
Returns the entry with the specified key. |
int |
hashCode()
Returns the hash code value for this IntHashMap . |
IntHashMap.Entry |
headEntry()
Returns the head entry of this map. |
boolean |
isEmpty()
Indicates if this IntHashMap contains no key-value mappings. |
org.apache.commons.collections.primitives.IntListIterator |
keyIterator()
|
org.apache.commons.collections.primitives.IntCollection |
keys()
|
protected IntHashMap.Entry |
newEntry()
Returns a new entry for this map; sub-classes may override this method to use custom entries. |
java.lang.Object |
put(int key,
java.lang.Object value)
Associates the specified value with the specified key in this IntHashMap . |
void |
putAll(IntHashMap that)
Copies all of the mappings from the specified map to this IntHashMap . |
java.lang.Object |
remove(int key)
Removes the mapping for this key from this IntHashMap if present. |
void |
removeEntry(IntHashMap.Entry entry)
Removes the specified entry from the map. |
int |
size()
Returns the number of key-value mappings in this IntHashMap . |
IntHashMap.Entry |
tailEntry()
Returns the tail entry of this map. |
java.lang.String |
toString()
Returns the textual representation of this IntHashMap . |
IntHashMap.ValueIterator |
valueIterator()
Returns a list iterator over the values in this list in proper sequence, (this map maintains the insertion order). |
IntHashMap.Values |
values()
Returns a RowCollection view of the values contained in this
IntHashMap . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IntHashMap()
public IntHashMap(int capacity)
capacity
- the initial capacity.public IntHashMap(IntHashMap map)
map
- the map whose entries are to be placed into this map.Method Detail |
---|
public void clear()
IntHashMap
.
public final boolean containsKey(int key)
IntHashMap
contains a mapping for the specified key.
key
- the key whose presence in this map is to be tested.
true
if this map contains a mapping for the specified key;
false
otherwise.public final boolean containsValue(java.lang.Object value)
IntHashMap
maps one or more keys to the specified value.
value
- the value whose presence in this map is to be tested.
true
if this map maps one or more keys to the specified
value.public IntHashMap.EntryIterator entryIterator()
public boolean equals(java.lang.Object obj)
IntHashMap
for equality. Returns
true
if the given object is also a map and the two maps represent
the same mappings (regardless of collection iteration order).
equals
in class java.lang.Object
obj
- the object to be compared for equality with this map.
true
if the specified object is equal to this map;
false
otherwise.public final java.lang.Object get(int key)
IntHashMap
maps the specified key.
key
- the key whose associated value is to be returned.
null
if there is no mapping for the key.public final IntHashMap.Entry getEntry(int key)
key
- the key whose associated entry is to be returned.
null
if none.public int hashCode()
IntHashMap
.
hashCode
in class java.lang.Object
public final IntHashMap.Entry headEntry()
headEntry().getNextEntry()
holds the first
map entry.public final boolean isEmpty()
IntHashMap
contains no key-value mappings.
true
if this map contains no key-value mappings;
false
otherwise.public org.apache.commons.collections.primitives.IntListIterator keyIterator()
public final java.lang.Object put(int key, java.lang.Object value)
IntHashMap
.
If the IntHashMap
previously contained a mapping for this key, the old value
is replaced.
key
- the key with which the specified value is to be associated.value
- the value to be associated with the specified key.
null
if
there was no mapping for key. A null
return can also
indicate that the map previously associated null
with the
specified key.public final void putAll(IntHashMap that)
IntHashMap
.
map
- the mappings to be stored in this map.public final java.lang.Object remove(int key)
IntHashMap
if present.
key
- the key whose mapping is to be removed from the map.
null
if
there was no mapping for key. A null
return can also
indicate that the map previously associated null
with the
specified key.public void removeEntry(IntHashMap.Entry entry)
entry
- the entry to be removed.public final IntHashMap.ValueIterator valueIterator()
public final int size()
IntHashMap
.
public final IntHashMap.Entry tailEntry()
tailEntry().getPreviousEntry()
holds the
last map entry.public java.lang.String toString()
IntHashMap
.
toString
in class java.lang.Object
public final IntHashMap.Values values()
RowCollection
view of the values contained in this
IntHashMap
. The collection is backed by the map, so changes to the map are
reflected in the collection, and vice-versa. The collection supports element
removal, which removes the corresponding mapping from this map, via the
RowIterator.remove
,RowCollection.remove
and
clear
operations.
public org.apache.commons.collections.primitives.IntCollection keys()
protected IntHashMap.Entry newEntry()
protected void addEntry(int hash, int key, java.lang.Object value)
hash
- the hash of the key, generated with #keyHash
.key
- the entry's key.value
- the entry's value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |