|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.acorn.util.UnmodifiableMap
public class UnmodifiableMap
An unmodifiable map wrapper filtering out additions and removals.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Constructor Summary | |
|---|---|
UnmodifiableMap()
Constructs an empty map. |
|
UnmodifiableMap(Map m)
Constructs a new map. |
|
| Method Summary | |
|---|---|
boolean |
add(int index,
Object key,
Object value)
Associates the specified value with the specified key to the specified index in this map if not already mapped. |
boolean |
add(Object key,
Object value)
Associates the specified value with the specified key at the end of this map if not already mapped. |
void |
clear()
|
Object |
clone()
|
boolean |
containsKey(Object key)
|
boolean |
containsValue(Object value)
|
List |
entryList()
Returns an ordered list of mapped entries. |
Set |
entrySet()
Returns an ordered set of mapped entries. |
boolean |
equals(Object o)
|
Object |
get(int index)
Gets the indexed value in this map. |
Object |
get(Object key)
|
Map.Entry |
getEntryAt(int index)
Gets the indexed entry in this map. |
Object |
getKeyAt(int index)
Gets the indexed key in this map. |
protected Map |
getMap()
Gets the map adaptee. |
int |
hashCode()
|
int |
indexOfKey(Object key)
Returns the index of the specified key, or -1 if not found. |
boolean |
isEmpty()
|
boolean |
isModifiable()
Checks whether this map is modifiable. |
protected boolean |
isOrdered()
Checks whether the wrapped map is ordered. |
List |
keyList()
Returns an ordered list of mapped keys. |
Set |
keySet()
Returns an ordered set of mapped keys. |
Object |
put(int index,
Object key,
Object value)
Associates the specified value with the specified key to the specified index in this map. |
Object |
put(Object key,
Object value)
|
void |
putAll(Map m)
|
Object |
putIfAbsent(int index,
Object key,
Object value)
Associates the specified value with the specified key to the specified index in this map if not already mapped. |
Object |
putIfAbsent(Object key,
Object value)
|
Object |
remove(int index)
Removes the indexed element in this map. |
Object |
remove(Object key)
|
boolean |
remove(Object key,
Object value)
|
Object |
replace(int index,
Object value)
Replaces the indexed element in this map. |
Object |
replace(Object key,
Object value)
|
boolean |
replace(Object key,
Object oldValue,
Object newValue)
|
protected void |
setMap(Map m)
Sets the map adaptee. |
int |
size()
|
String |
toString()
|
List |
valueList()
Returns an ordered list of mapped values. |
Collection |
values()
Returns an ordered collection of mapped values. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public UnmodifiableMap()
public UnmodifiableMap(Map m)
m - a map to wrap.| Method Detail |
|---|
public boolean equals(Object o)
equals in interface Mapequals in class Objectpublic int hashCode()
hashCode in interface MaphashCode in class Objectpublic Object clone()
clone in class Objectpublic void clear()
clear in interface Mappublic boolean containsKey(Object key)
containsKey in interface Mappublic boolean containsValue(Object value)
containsValue in interface Mappublic Set entrySet()
OrderedMap
entrySet in interface MapentrySet in interface OrderedMappublic Object get(Object key)
get in interface Mappublic boolean isEmpty()
isEmpty in interface Mappublic Set keySet()
OrderedMap
keySet in interface MapkeySet in interface OrderedMap
public Object put(Object key,
Object value)
put in interface Mappublic void putAll(Map m)
putAll in interface Mappublic Object remove(Object key)
remove in interface Mappublic int size()
size in interface Mappublic Collection values()
OrderedMap
values in interface Mapvalues in interface OrderedMappublic String toString()
toString in class Object
public Object putIfAbsent(Object key,
Object value)
putIfAbsent in interface ConcurrentMap
public Object replace(Object key,
Object value)
replace in interface ConcurrentMap
public boolean replace(Object key,
Object oldValue,
Object newValue)
replace in interface ConcurrentMap
public boolean remove(Object key,
Object value)
remove in interface ConcurrentMappublic boolean isModifiable()
OrderedMap
isModifiable in interface OrderedMappublic int indexOfKey(Object key)
OrderedMap
indexOfKey in interface OrderedMapkey - the key.
public Object getKeyAt(int index)
OrderedMap
getKeyAt in interface OrderedMapindex - the index.
public Object get(int index)
OrderedMap
get in interface OrderedMapindex - the index.
public Map.Entry getEntryAt(int index)
OrderedMap
getEntryAt in interface OrderedMapindex - the index.
public Object put(int index,
Object key,
Object value)
OrderedMap
put in interface OrderedMapindex - the index.key - key with which the specified value is to be associated.value - value to be associated with the specified key.
public Object putIfAbsent(int index,
Object key,
Object value)
OrderedMap
putIfAbsent in interface OrderedMapindex - the index.key - key with which the specified value is to be associated.value - value to be associated with the specified key.
public boolean add(Object key,
Object value)
OrderedMap
add in interface OrderedMapkey - key with which the specified value is to be associated.value - value to be associated with the specified key.
public boolean add(int index,
Object key,
Object value)
OrderedMap
add in interface OrderedMapindex - the index.key - key with which the specified value is to be associated.value - value to be associated with the specified key.
public Object replace(int index,
Object value)
OrderedMap
replace in interface OrderedMapindex - the index.value - the new value.
public Object remove(int index)
OrderedMap
remove in interface OrderedMapindex - the index.
public List keyList()
OrderedMap
keyList in interface OrderedMappublic List valueList()
OrderedMap
valueList in interface OrderedMappublic List entryList()
OrderedMap
entryList in interface OrderedMapprotected boolean isOrdered()
protected Map getMap()
protected void setMap(Map m)
m - the wrapped map.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||