Package csw.command.client
Class Store<K,V>
- java.lang.Object
-
- csw.command.client.Store<K,V>
-
- Type Parameters:
K- type of the keyV- type of the value
- All Implemented Interfaces:
java.io.Serializable,scala.Equals,scala.Product,scala.Serializable
public class Store<K,V> extends java.lang.Object implements scala.Product, scala.SerializableStore represents the storage of a set of values against a given keyparam: map initial store map
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Store<K,V>addOrUpdate(K key, V value)Add or update the value in the store against the given keyabstract static booleancanEqual(java.lang.Object that)abstract static booleanequals(java.lang.Object that)static <K,V>
Store<K,V>fromMap(scala.collection.immutable.Map<K,scala.collection.immutable.Set<V>> map)scala.collection.immutable.Set<V>get(K key)Get the set of values against the given key.scala.collection.immutable.Map<K,scala.collection.immutable.Set<V>>map()abstract static intproductArity()abstract static java.lang.ObjectproductElement(int n)static scala.collection.Iterator<java.lang.Object>productIterator()static java.lang.StringproductPrefix()Store<K,V>remove(K key, V value)Remove the value from the store against the given keyStore<K,V>remove(V value)Remove the value from the store.
-
-
-
Method Detail
-
fromMap
public static <K,V> Store<K,V> fromMap(scala.collection.immutable.Map<K,scala.collection.immutable.Set<V>> map)
-
canEqual
public abstract static boolean canEqual(java.lang.Object that)
-
equals
public abstract static boolean equals(java.lang.Object that)
-
productElement
public abstract static java.lang.Object productElement(int n)
-
productArity
public abstract static int productArity()
-
productIterator
public static scala.collection.Iterator<java.lang.Object> productIterator()
-
productPrefix
public static java.lang.String productPrefix()
-
addOrUpdate
public Store<K,V> addOrUpdate(K key, V value)
Add or update the value in the store against the given key- Parameters:
key- key of the storevalue- value against the key- Returns:
- updated store after adding/update value
-
remove
public Store<K,V> remove(K key, V value)
Remove the value from the store against the given key- Parameters:
key- key of the storevalue- value to be removed against the key- Returns:
- updated store after removing the value
-
remove
public Store<K,V> remove(V value)
Remove the value from the store. The value could be present against multiple keys and it will be removed from all places.- Parameters:
value- value to be removed from the store- Returns:
- updated store after removing the value
-
-