|
TUM CCSM Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.tum.cs.commons.collections.HashedListMap<K,I>
edu.tum.cs.commons.collections.UnmodifiableHashedListMap<K,I>
public class UnmodifiableHashedListMap<K,I>
This is a wrapper for a HashedListMap
prohibiting all calls that
would modify its contents. As the construction of this class is performed in
constant time it is prefered over copying the collection (which takes linear
time). All prohibited methods throw an UnsupportedOperationException
.
Constructor Summary | |
---|---|
UnmodifiableHashedListMap(HashedListMap<K,I> map)
Create new unmodifiable hashed list map. |
Method Summary | |
---|---|
void |
add(K key,
I item)
Operation is not supported. |
boolean |
containsList(K key)
Check if a list is present for a given key. |
java.util.List<I> |
createList(K key)
Operation is not supported. |
UnmodifiableSet<K> |
getKeys()
Get keys. |
UnmodifiableList<I> |
getList(K key)
Get list for key. |
UnmodifiableList<I> |
getValues()
Return all values from all lists. |
Methods inherited from class edu.tum.cs.commons.collections.HashedListMap |
---|
addAll, addAll, areAllListsEmpty, clear, listsToArrays, removeAllLists, removeList |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UnmodifiableHashedListMap(HashedListMap<K,I> map)
map
- the map to wrap
java.lang.IllegalArgumentException
- if map is null
Method Detail |
---|
public java.util.List<I> createList(K key)
createList
in class HashedListMap<K,I>
java.lang.UnsupportedOperationException
public UnmodifiableList<I> getList(K key)
getList
in class HashedListMap<K,I>
null
public void add(K key, I item)
add
in class HashedListMap<K,I>
java.lang.UnsupportedOperationException
public boolean containsList(K key)
containsList
in class HashedListMap<K,I>
public UnmodifiableSet<K> getKeys()
getKeys
in class HashedListMap<K,I>
public UnmodifiableList<I> getValues()
getValues
in class HashedListMap<K,I>
|
TUM CCSM Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |