Modifier and Type | Field and Description |
---|---|
protected int |
modCount
The number of times this list has been structurally modified.
|
Constructor and Description |
---|
IntHashMap()
Constructs an empty HashMap with the default initial capacity (16)
and the default load factor (0.75).
|
IntHashMap(int initialCapacity)
Constructs an empty HashMap with the specified initial capacity and
the default load factor (0.75).
|
IntHashMap(int initialCapacity,
float loadFactor)
Constructs an empty HashMap with the specified initial capacity and
load factor.
|
IntHashMap(IntHashMap anIntHashMap)
Constructs a new HashMap with the same mappings as the specified Map.
|
IntHashMap(Map aMap)
Constructs a new HashMap with the same mappings as the specified map.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all mappings from this map.
|
Object |
clone()
Returns a shallow copy of this HashMap instance: the values themselves
are not cloned.
|
boolean |
containsKey(int key)
Returns true if this map contains a mapping for the specified key.
|
boolean |
containsKey(Integer key)
Returns true if this map contains a mapping for the intvalue of the
specified Integer as key.
|
boolean |
containsValue(Object value)
Returns true if this map maps one or more keys to the specified value.
|
Set |
entrySet()
Returns a collection view of the mappings contained in this map.
|
boolean |
equals(Object o)
Compares the specified object with this map for equality.
|
Object |
get(int key)
Returns the value to which the specified key is mapped in this
hashmap, or null if the map contains no mapping for this key.
|
Object |
get(Integer key)
Returns the value to which the specified Integers int value is mapped
in this hashmap, or null if the map contains no mapping for the key.
|
int |
hashCode()
Returns the hash code value for this map.
|
boolean |
isEmpty()
Returns true if this map contains no key-value mappings.
|
Set |
keySet()
Returns a set view of the keys contained in this map, with the int
keys wrapped into
Integer objects. |
Object |
put(Integer key,
Object value)
Associates the specified value with the int valie of the specified
Integer as key in this map.
|
Object |
put(int key,
Object value)
Associates the specified value with the specified key in this map.
|
void |
putAll(IntHashMap anIntHashMap)
Copies all of the mappings from the specified map to this map.
|
void |
putAll(Map aMap)
Copies all of the mappings from the specified map to this map.
|
Object |
remove(int key)
Removes the mapping for this key from this map if present.
|
Object |
remove(Integer key)
Removes the mapping for the int value of the given Integer as key
from this map if present.
|
org.siox.util.IntHashMap.Entry |
removeEntryByKey(int key) |
int |
size()
Returns the number of key-value mappings in this map.
|
String |
toString()
Returns a string representation of this map.
|
Collection |
values()
Returns a collection view of the values contained in this map.
|
protected transient int modCount
public IntHashMap()
public IntHashMap(int initialCapacity)
public IntHashMap(int initialCapacity, float loadFactor)
public IntHashMap(Map aMap)
public IntHashMap(IntHashMap anIntHashMap)
public void clear()
public Object clone()
public boolean containsKey(int key)
public boolean containsKey(Integer key)
public boolean containsValue(Object value)
public Set entrySet()
public boolean equals(Object o)
public Object get(int key)
public Object get(Integer key)
public int hashCode()
public boolean isEmpty()
public Set keySet()
Integer
objects.public Object put(int key, Object value)
null
if it did not have one.public Object put(Integer key, Object value)
public void putAll(IntHashMap anIntHashMap)
public void putAll(Map aMap)
ClassCastException
- if a key of class other than Integer is
contained in the given map.public org.siox.util.IntHashMap.Entry removeEntryByKey(int key)
public Object remove(int key)
null
if the key did not have a mapping.public Object remove(Integer key)
public int size()
public String toString()
public Collection values()
Copyright © 2015–2021 Fiji. All rights reserved.