Package org.ow2.authzforce.core.pdp.api
Class UpdatableCollections
- java.lang.Object
-
- org.ow2.authzforce.core.pdp.api.UpdatableCollections
-
public final class UpdatableCollections extends Object
Factory forUpdatableList
s
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <E> UpdatableList<E>
emptyList()
Get instance of UpdatableList that does not update anything andUpdatableList.copy()
always return an empty list.static <K,V>
UpdatableMap<K,V>emptyMap()
Get instance of UpdatableMap that does not update anything andUpdatableMap.copy()
always return an empty Map.static <E> UpdatableSet<E>
emptySet()
Get instance of UpdatableSet that does not update anything andUpdatableSet.copy()
always return an empty Set.static <E> UpdatableList<E>
newUpdatableList()
Create new instance of UpdatableList not accepting null valuesstatic <K,V>
UpdatableMap<K,V>newUpdatableMap()
Create new instance of UpdatableMap not accepting null valuesstatic <E> UpdatableSet<E>
newUpdatableSet()
Create new instance of UpdatableSet not accepting null values
-
-
-
Method Detail
-
emptyList
public static <E> UpdatableList<E> emptyList()
Get instance of UpdatableList that does not update anything andUpdatableList.copy()
always return an empty list. This implementation does not raise any exception onUpdatableCollection.add(Object)
andUpdatableCollection.addAll(Collection)
method but merely return false always. This is useful merely for polymorphism.- Returns:
- "empty" list, i.e. list that silently ignores updates and always stays empty
-
newUpdatableList
public static <E> UpdatableList<E> newUpdatableList()
Create new instance of UpdatableList not accepting null values- Returns:
- new instance
-
emptySet
public static <E> UpdatableSet<E> emptySet()
Get instance of UpdatableSet that does not update anything andUpdatableSet.copy()
always return an empty Set. This implementation does not raise any exception onUpdatableCollection.add(Object)
andUpdatableCollection.addAll(Collection)
method but merely return false always. This is useful merely for polymorphism.- Returns:
- "empty" Set, i.e. list that silently ignores updates and always stays empty
-
newUpdatableSet
public static <E> UpdatableSet<E> newUpdatableSet()
Create new instance of UpdatableSet not accepting null values- Returns:
- new instance
-
emptyMap
public static <K,V> UpdatableMap<K,V> emptyMap()
Get instance of UpdatableMap that does not update anything andUpdatableMap.copy()
always return an empty Map. This implementation does not raise any exception onUpdatableMap.put(Object, Object)
andUpdatableMap.putAll(Map)
method but merely return false always. This is useful merely for polymorphism.- Returns:
- "empty" Set, i.e. list that silently ignores updates and always stays empty
-
newUpdatableMap
public static <K,V> UpdatableMap<K,V> newUpdatableMap()
Create new instance of UpdatableMap not accepting null values- Returns:
- new instance
-
-