org.softamis.net.registry.impl
Interface AbstractProvidingRegistry.ItemsStorage<K extends java.io.Serializable,V extends java.io.Serializable>

All Known Implementing Classes:
AbstractProvidingRegistry.MultiValueItemsStorage, AbstractProvidingRegistry.SingleValueItemsStorage
Enclosing class:
AbstractProvidingRegistry<K extends java.io.Serializable,V extends java.io.Serializable>

protected static interface AbstractProvidingRegistry.ItemsStorage<K extends java.io.Serializable,V extends java.io.Serializable>

Interface with represents storage used by registry to store registered values internally


Method Summary
 boolean add(K aKey, V aValue)
          Adds value to the storage
 void clear()
          Clears all storage content
 java.util.List<java.util.Map.Entry<K,V>> getItems()
          Returns list of entires for registered items
 java.util.List<V> getItems(K aKey)
          Returns list of values which are registered under given key
 boolean isMultiValued()
          Allows to check whether storage allows to store several values under the same key
 void remove(K aKey)
          Removes items stored under given key
 

Method Detail

add

boolean add(K aKey,
            V aValue)
Adds value to the storage

Parameters:
aKey - key of item
aValue - value of item
Returns:
true if item was actually added to storage, false otherwise

getItems

java.util.List<java.util.Map.Entry<K,V>> getItems()
Returns list of entires for registered items


remove

void remove(K aKey)
Removes items stored under given key

Parameters:
aKey - key of item

clear

void clear()
Clears all storage content


isMultiValued

boolean isMultiValued()
Allows to check whether storage allows to store several values under the same key

Returns:
true if several values could be registered on the same key

getItems

java.util.List<V> getItems(K aKey)
Returns list of values which are registered under given key

Parameters:
aKey - key of item
Returns:
list of items