Interface ResizableSequence<T>

Type Parameters:
T - type of the elements in the ResizableSequence
All Superinterfaces:
Assortment<T>, Countable, EditableSequence<T>, Enumerable<T>, Iterable<T>, Sequence<T>

public interface ResizableSequence<T> extends EditableSequence<T>
Defines the contract for resizable Sequence. This a Sequence where elements can be added and removed.
  • Method Details

    • toSequence

      default ResizableSequence<T> toSequence()
      Returns to Sequence.
      Specified by:
      toSequence in interface EditableSequence<T>
      Specified by:
      toSequence in interface Enumerable<T>
      Specified by:
      toSequence in interface Sequence<T>
      Returns:
      the result of toSequence
    • add

      boolean add(T e)
      Performs add.
      Parameters:
      e - the e value
      Returns:
      the result of add
    • remove

      boolean remove(Object o)
      Performs remove.
      Parameters:
      o - the o value
      Returns:
      the result of remove
    • addAll

      boolean addAll(Iterable<? extends T> c)
      Performs add All.
      Parameters:
      c - the c value
      Returns:
      the result of addAll
    • addAllAt

      boolean addAllAt(int index, Iterable<? extends T> c)
      Performs add All At.
      Parameters:
      index - the index value
      c - the c value
      Returns:
      the result of addAllAt
    • removeAll

      boolean removeAll(Iterable<? extends T> c)
      Performs remove All.
      Parameters:
      c - the c value
      Returns:
      the result of removeAll
    • retainAll

      boolean retainAll(Iterable<? extends T> c)
      Performs retainAll.
      Parameters:
      c - the c value
      Returns:
      the result of retainAll
    • replaceAll

      void replaceAll(UnaryOperator<T> operator)
      Performs replaceAll.
      Parameters:
      operator - the operator value
    • sort

      void sort(Comparator<? super T> c)
      Performs sort.
      Parameters:
      c - the c value
    • clear

      void clear()
      Performs clear.
    • removeAt

      Maybe<T> removeAt(int index)
      Performs remove At.
      Parameters:
      index - the index value
      Returns:
      the result of removeAt
    • addAt

      void addAt(int index, T element)
      Performs add At.
      Parameters:
      index - the index value
      element - the element value
    • removeIf

      boolean removeIf(Predicate<? super T> filter)
      Performs remove If.
      Parameters:
      filter - the filter value
      Returns:
      the result of removeIf
    • indexOf

      Int indexOf(Object o)
      Performs indexOf.
      Specified by:
      indexOf in interface Sequence<T>
      Parameters:
      o - the o value
      Returns:
      the result of indexOf
    • lastIndexOf

      Int lastIndexOf(Object o)
      Returns last Index Of.
      Specified by:
      lastIndexOf in interface Sequence<T>
      Parameters:
      o - the o value
      Returns:
      the result of lastIndexOf
    • subSequence

      ResizableSequence<T> subSequence(int fromIndex, int toIndex)
      Performs subSequence.
      Specified by:
      subSequence in interface EditableSequence<T>
      Specified by:
      subSequence in interface Sequence<T>
      Parameters:
      fromIndex - the fromIndex value
      toIndex - the toIndex value
      Returns:
      the result of subSequence
    • addFirst

      void addFirst(T e)
      Performs add First.
      Parameters:
      e - the e value
    • addLast

      void addLast(T e)
      Performs add Last.
      Parameters:
      e - the e value
    • reversed

      ResizableSequence<T> reversed()
      Performs reversed.
      Specified by:
      reversed in interface EditableSequence<T>
      Specified by:
      reversed in interface Sequence<T>
      Returns:
      the result of reversed