Class UpdatableCollections


  • public final class UpdatableCollections
    extends Object
    Factory for UpdatableLists
    • Method Detail

      • newUpdatableList

        public static <E> UpdatableList<E> newUpdatableList()
        Create new instance of UpdatableList not accepting null values
        Returns:
        new instance
      • 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 and UpdatableMap.copy() always return an empty Map. This implementation does not raise any exception on UpdatableMap.put(Object, Object) and UpdatableMap.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