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

Interface ListBuilder<V>

  • All Superinterfaces:
    Builder<V>
    public interface ListBuilder<V> extends Builder<V>
    An interface for a list builder. A list builder is a mutable object that accepts a sequence of elements and creates a list containing those elements.
    • Methods 
      Modifier and Type Method and Description
      Inherited member indicator add Reveal DetailHide Detail
      abstract void add(V e)
      Add an element to be included in the collection.
      void add(V e)
      Description copied from interface: Builder
      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.
      Inherited 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
      Description copied from interface: Builder
      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.
      Inherited member indicator addOptional Reveal DetailHide Detail
      void addOptional(V e)
       
      void addOptional(V e)
      Inherited member indicator isEmpty Reveal DetailHide Detail
      abstract boolean isEmpty()
      Indicate whether the collection created in the current state would be empty.
      boolean isEmpty()
      Description copied from interface: Builder
      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 lastItem Reveal DetailHide Detail
      abstract V lastItem()
      Identify the element that would be the last element of the list created in the current state.
      V lastItem()
      Identify the element that would be the last element of the list created in the current state.
      Returns:
      the last element, or null if the list would be empty.
      Inherited member indicator reset Reveal DetailHide Detail
      abstract void reset()
      Remove all previously supplied elements.
      void reset()
      Description copied from interface: Builder
      Remove all previously supplied elements.
      Inherited 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()
      Description copied from interface: Builder
      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 IList<V> values()
      Return a list containing the previously supplied (and not removed) elements.
      IList<V> values()
      Return a list containing the previously supplied (and not removed) elements.
      Specified by:
      values in interface Builder<V>
      Returns:
      the list.