org.nnsoft.shs.collections
Interface MultiValued<K,V>

All Known Implementing Classes:
SimpleMultiValued

public interface MultiValued<K,V>

A MultiValued is a read-only data structure where multiple values are associated to the same key.


Method Summary
 boolean contains(K key)
          Verifies the input key is contained in the collection.
 Iterable<Map.Entry<K,List<V>>> getAllEntries()
          Returns an unmodifiable iterable instance over all stored entries.
 Set<K> getAllKeys()
          Returns an unmodifiable set containing all the stored keys.
 V getFirstValue(K key)
          Returns the first associated value to the given key, if found, null otherwise.
 List<V> getValues(K key)
          Returns an unmodifiable list with all the associated values to the given key, if found, null otherwise.
 

Method Detail

contains

boolean contains(K key)
Verifies the input key is contained in the collection.

Parameters:
key - the non null key to check
Returns:
true if the key is found, false otherwise

getFirstValue

V getFirstValue(K key)
Returns the first associated value to the given key, if found, null otherwise.

Parameters:
key - the non null key for which retrieve the value
Returns:
the first associated value to the given key, if found, null otherwise.

getValues

List<V> getValues(K key)
Returns an unmodifiable list with all the associated values to the given key, if found, null otherwise.

Parameters:
key - the non null key for which retrieve the values
Returns:
an unmodifiable list with all the associated values to the given key, if found, null otherwise.

getAllKeys

Set<K> getAllKeys()
Returns an unmodifiable set containing all the stored keys.

Returns:
an unmodifiable set all the stored keys.

getAllEntries

Iterable<Map.Entry<K,List<V>>> getAllEntries()
Returns an unmodifiable iterable instance over all stored entries.

Returns:
an unmodifiable iterable instance over all stored entries.


Copyright © 2012 99 Software Foundation. All Rights Reserved.