|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javautils.maps.AbstractTypedMap
Abstract base for typed maps.
Field Summary | |
protected java.util.Map |
map
|
Constructor Summary | |
AbstractTypedMap()
A new map based on HashMap . |
|
AbstractTypedMap(java.util.Map map)
A new map based on the given map. |
Method Summary | |
void |
clear()
Removes all mappings from this map. |
java.lang.Object |
clone()
A new deepish clone of the map (values are cloned, but keys, which should never be modified anyway, aren't). |
boolean |
containsKey(java.lang.Object key)
True if and only if the key is associated with a value. |
boolean |
isEmpty()
True iff the size of this map is 0 . |
java.util.Iterator |
keyIterator()
An iterator over all keys of this map. |
java.util.Set |
keySet()
A mutable set of keys of this map. |
void |
remove(java.lang.Object key)
Removes the specified key from this map. |
int |
size()
The size of this map. |
java.lang.String |
toString()
A textual representation of this map. |
java.util.Map |
unmodifiableMap()
An unmodifiable view to the internal map. |
java.util.Iterator |
valueIterator()
An iterator over all values of this map. |
protected abstract boolean |
valuePredicate(java.lang.Object value)
True iff the value satisfies the typing constraints. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected final java.util.Map map
Constructor Detail |
public AbstractTypedMap()
A new map based on HashMap
.
public AbstractTypedMap(java.util.Map map)
A new map based on the given map.
Method Detail |
public void clear()
Removes all mappings from this map.
public java.lang.Object clone()
A new deepish clone of the map (values are cloned, but keys, which should never be modified anyway, aren't).
clone
in class java.lang.Object
public boolean containsKey(java.lang.Object key)
True if and only if the key is associated with a value.
public boolean isEmpty()
True iff the size of this map is 0
.
public java.util.Iterator keyIterator()
An iterator over all keys of this map.
public java.util.Set keySet()
A mutable set of keys of this map.
public void remove(java.lang.Object key)
Removes the specified key from this map.
public int size()
The size of this map.
public java.lang.String toString()
A textual representation of this map.
toString
in class java.lang.Object
public java.util.Map unmodifiableMap()
An unmodifiable view to the internal map.
public java.util.Iterator valueIterator()
An iterator over all values of this map.
protected abstract boolean valuePredicate(java.lang.Object value)
True iff the value satisfies the typing constraints.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |