Package
Class
Use
Tree
Deprecated
Index
All Classes
Help
Prev Class
Next Class
VCollections – Release 1
Interface org.violetlib.collections.Builder
Inherited members: ShowHide
Deprecated: ShowHide
org.violetlib.collections

Interface Builder<V>

  • Type Parameters:
    V - The type of the elements.
    All Known Subinterfaces:
    ListBuilder<V>, SetBuilder<V>
    public interface Builder<V>
    A collection builder. A collection builder is a mutable object that accepts a sequence of elements and creates a collection containing those elements.
    • Methods 
      Modifier and Type Method and Description
      Ordinary member indicator add Reveal DetailHide Detail
      abstract void add(V e)
      Add an element to be included in the collection.
      void add(V e)
      Add an element to be included in the collection. The order in which elements are added may determine the order of elements in an ordered collection.
      Parameters:
      e - The element to be added.
      Ordinary member indicator addAll Reveal DetailHide Detail
      void addAll(Iterable<? extends V> it)
      A convenience method to add the elements obtained from the supplied iterable collection.
      void addAll(Iterable<? extends V> it) throws IllegalArgumentException
      A convenience method to add the elements obtained from the supplied iterable collection.
      Parameters:
      it - The iterable collection that provides the elements.
      Throws:
      IllegalArgumentException - if the sequence contains a null element.
      Ordinary member indicator addOptional Reveal DetailHide Detail
      void addOptional(V e)
       
      void addOptional(V e)
      Ordinary member indicator isEmpty Reveal DetailHide Detail
      abstract boolean isEmpty()
      Indicate whether the collection created in the current state would be empty.
      boolean isEmpty()
      Indicate whether the collection created in the current state would be empty.
      Returns:
      true if and only if the collection would be empty.
      Ordinary member indicator reset Reveal DetailHide Detail
      abstract void reset()
      Remove all previously supplied elements.
      void reset()
      Remove all previously supplied elements.
      Ordinary member indicator size Reveal DetailHide Detail
      abstract int size()
      Return the number of elements that would be contained in the collection created in the current state.
      int size()
      Return the number of elements that would be contained in the collection created in the current state.
      Returns:
      the number of elements.
      Ordinary member indicator values Reveal DetailHide Detail
      abstract ICollection<V> values()
      Return a collection containing the previously supplied (and not removed) elements.
      ICollection<V> values()
      Return a collection containing the previously supplied (and not removed) elements.
      Returns:
      the collection.