Interface UpdatableCollection<E>

  • Type Parameters:
    E - the type of elements in this collection
    All Known Subinterfaces:
    UpdatableList<E>, UpdatableSet<E>

    public interface UpdatableCollection<E>
    Updatable collection; "updatable" means elements can only be added to the collection (no removal, no clear)
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean add​(E e)
      Append element to the collection
      boolean addAll​(Collection<? extends E> c)
      Appends all the elements in the specified collection to this collection
      boolean addAll​(UpdatableCollection<E> c)
      Appends all the elements in the specified collection to this collection
      com.google.common.collect.ImmutableCollection<E> copy()
      Creates an immutable copy with all the elements currently in this collection
      com.google.common.collect.UnmodifiableIterator<E> iterator()  
    • Method Detail

      • add

        boolean add​(E e)
        Append element to the collection
        Parameters:
        e - new element to append
        Returns:
        true iff the list changed as a result of the call
      • addAll

        boolean addAll​(Collection<? extends E> c)
        Appends all the elements in the specified collection to this collection
        Parameters:
        c - list containing elements to be added to this list
        Returns:
        true iff the list changed as a result of the call
      • addAll

        boolean addAll​(UpdatableCollection<E> c)
        Appends all the elements in the specified collection to this collection
        Parameters:
        c - list containing elements to be added to this list
        Returns:
        true iff the list changed as a result of the call
      • iterator

        com.google.common.collect.UnmodifiableIterator<E> iterator()
        Returns:
        iterator over elements in this collection (remove() operation is not supported)
      • copy

        com.google.common.collect.ImmutableCollection<E> copy()
        Creates an immutable copy with all the elements currently in this collection
        Returns:
        immutable copy of the collection