|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ReadOnlyMap<K,V>
Contract for a map of object indexed by keys of type K and holding values of type V. Iteration will return only the values. No modifying operations on the map are defined by this interface, making it a candidate for passing out readonly references.
Method Summary | |
---|---|
boolean |
containsKey(K key)
determines whether the map contains an entry under the given key |
V |
get(K key)
gets the object stored under the given key |
boolean |
isEmpty()
Determines whether this instance is empty. |
Iterator<K> |
keyIterator()
Iterator over the keys in this instance |
K[] |
keysAsArray(K[] array)
Returns an array containing all keys of this instance according to the contract defined in java.util.Collection#toArray(T[] a) . |
int |
size()
Determines the number of items in this instance. |
Iterator<V> |
valueIterator()
Iterator over the values in this instance |
V[] |
valuesAsArray(V[] array)
Returns an array containing all values of this instance according to the contract defined in java.util.Collection#toArray(T[] a) . |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Method Detail |
---|
boolean containsKey(K key)
V get(K key)
Iterator<K> keyIterator()
Iterator<V> valueIterator()
boolean isEmpty()
int size()
K[] keysAsArray(K[] array)
java.util.Collection#toArray(T[] a)
.
array
- the target array
V[] valuesAsArray(V[] array)
java.util.Collection#toArray(T[] a)
.
array
- the target array
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |