Interface IDequeBuilder<T>

All Known Implementing Classes:
ArrayDeque.Builder

public interface IDequeBuilder<T>
  • Method Summary

    Modifier and Type
    Method
    Description
    add(T value)
    Adds the specified value to the values included in the collection when build() is called.
    default IDequeBuilder<T>
    addAll(Iterable<? extends T> source)
    Adds all values in the Collection to the values included in the collection when build() is called.
    default IDequeBuilder<T>
    addAll(Iterator<? extends T> source)
    Adds all values in the Iterator to the values included in the collection when build() is called.
    default <K extends T>
    IDequeBuilder<T>
    addAll(K... source)
    Adds all values in the array to the values included in the collection when build() is called.
    default IDequeBuilder<T>
    addAll(Indexed<? extends T> source)
    Adds all values in the Indexed to the values included in the collection when build() is called.
    default IDequeBuilder<T>
    addAll(Indexed<? extends T> source, int offset, int limit)
    Adds all values in the specified range of Indexed to the values included in the collection when build() is called.
    Builds and returns a collection containing all of the added values.
    Deletes all values.
    int
    Determines how many values will be in the collection if build() is called now.
  • Method Details

    • build

      @Nonnull IDeque<T> build()
      Builds and returns a collection containing all of the added values. May be called as often as desired and is safe to call and then continue adding more elements to build another collection with those additional elements.
      Returns:
      the collection
    • size

      int size()
      Determines how many values will be in the collection if build() is called now.
    • add

      @Nonnull IDequeBuilder<T> add(T value)
      Adds the specified value to the values included in the collection when build() is called.
      Returns:
      the builder (convenience for chaining multiple calls)
    • addAll

      @Nonnull default IDequeBuilder<T> addAll(Iterator<? extends T> source)
      Adds all values in the Iterator to the values included in the collection when build() is called.
      Parameters:
      source - Iterator containing values to add
      Returns:
      the builder (convenience for chaining multiple calls)
    • addAll

      @Nonnull default IDequeBuilder<T> addAll(Iterable<? extends T> source)
      Adds all values in the Collection to the values included in the collection when build() is called.
      Parameters:
      source - Collection containing values to add
      Returns:
      the builder (convenience for chaining multiple calls)
    • addAll

      @Nonnull default <K extends T> IDequeBuilder<T> addAll(K... source)
      Adds all values in the array to the values included in the collection when build() is called.
      Parameters:
      source - array containing values to add
      Returns:
      the builder (convenience for chaining multiple calls)
    • addAll

      @Nonnull default IDequeBuilder<T> addAll(Indexed<? extends T> source, int offset, int limit)
      Adds all values in the specified range of Indexed to the values included in the collection when build() is called.
      Parameters:
      source - Indexed containing values to add
      Returns:
      the builder (convenience for chaining multiple calls)
    • addAll

      @Nonnull default IDequeBuilder<T> addAll(Indexed<? extends T> source)
      Adds all values in the Indexed to the values included in the collection when build() is called.
      Parameters:
      source - Indexed containing values to add
      Returns:
      the builder (convenience for chaining multiple calls)
    • clear

      Deletes all values. This is useful to reset to build a new list with the same builder.
      Returns:
      the builder (convenience for chaining multiple calls)