|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectzombie.util.map.AbstractIntKeyMap<V>
public abstract class AbstractIntKeyMap<V>
This class represents an abstract base for implementing maps from int values to objects. All operations that can be implemented using iterators are implemented as such. In most cases, this is hardly an efficient solution, and at least some of those methods should be overridden by sub-classes.
Method Summary | |
---|---|
void |
clear()
Clears this map. |
boolean |
containsKey(int key)
Indicates whether this map contains a mapping from a specified key. |
boolean |
containsValue(java.lang.Object value)
Indicates whether this map contains a mapping to a specified value. |
boolean |
equals(java.lang.Object obj)
Indicates whether this map is equal to some object. |
V |
get(int key)
Maps a specified key to a value. |
int |
hashCode()
Returns a hash code value for this map. |
boolean |
isEmpty()
Indicates whether this map is empty. |
void |
putAll(IntKeyMap<V> map)
Adds all mappings from a specified map to this map. |
V |
remove(int key)
Removes the mapping from a specified key from this map. |
int |
size()
Returns the size of this map. |
java.lang.String |
toString()
Returns a string representation of this map. |
void |
trimToSize()
Does nothing. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface zombie.util.map.IntKeyMap |
---|
entries, keySet, put, values |
Method Detail |
---|
public void clear()
IntKeyMap
clear
in interface IntKeyMap<V>
public V remove(int key)
IntKeyMap
remove
in interface IntKeyMap<V>
key
- the key whose mapping to remove from this map.
public void putAll(IntKeyMap<V> map)
IntKeyMap
putAll
in interface IntKeyMap<V>
map
- the map whose mappings to add to this map.public boolean containsKey(int key)
IntKeyMap
containsKey
in interface IntKeyMap<V>
key
- the key to test for.
public V get(int key)
IntKeyMap
get
in interface IntKeyMap<V>
key
- the key to map to a value.
public boolean containsValue(java.lang.Object value)
IntKeyMap
containsValue
in interface IntKeyMap<V>
value
- the value to test for.
public boolean equals(java.lang.Object obj)
IntKeyMap
equals
in interface IntKeyMap<V>
equals
in class java.lang.Object
obj
- the object with which to compare this map.
public int hashCode()
IntKeyMap
hashCode
in interface IntKeyMap<V>
hashCode
in class java.lang.Object
public boolean isEmpty()
IntKeyMap
isEmpty
in interface IntKeyMap<V>
public int size()
IntKeyMap
size
in interface IntKeyMap<V>
public java.lang.String toString()
toString
in class java.lang.Object
public void trimToSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |