K
- type for keyV
- type for collection elementspublic abstract class MapOfCollections<K,V>
extends java.lang.Object
Constructor and Description |
---|
MapOfCollections() |
Modifier and Type | Method and Description |
---|---|
void |
addValue(K key,
V value,
V... furtherValues) |
int |
calcValueSize()
Returns cumulative size of all the values for all the keys in this map; note that this is
caclulated at every invocation.
|
boolean |
containsKey(K key) |
protected abstract java.util.Collection<V> |
createCollection() |
boolean |
isEmpty() |
java.util.Set<K> |
keys() |
int |
size()
Returns size of this map (i.e., number of keys).
|
java.util.Collection<V> |
subCollection(K key)
Returns sub-value for
key if found, empty collection otherwise. |
java.lang.String |
toString() |
java.util.List<java.lang.String> |
toStringLines() |
abstract V |
value(K key,
int idx)
"Descends"
key - idx ; returns null if no such value. |
public java.util.Collection<V> subCollection(K key)
key
if found, empty collection otherwise.public abstract V value(K key, int idx) throws java.lang.UnsupportedOperationException
key
- idx
; returns null if no such value.java.lang.UnsupportedOperationException
protected abstract java.util.Collection<V> createCollection()
public int size()
public int calcValueSize()
public java.util.Set<K> keys()
public boolean isEmpty()
public boolean containsKey(K key)
public java.util.List<java.lang.String> toStringLines()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright 2009-2016 Tatjana (Tanja) Kostic