Enum Class Empty.EmptyMSeq

All Implemented Interfaces:
BaseSeq<Object>, Copyable<MSeq<Object>>, MSeq<Object>, Seq<Object>, Serializable, Comparable<Empty.EmptyMSeq>, Constable, Iterable<Object>, IntFunction<Object>, RandomAccess
Enclosing class:
Empty

public static enum Empty.EmptyMSeq extends Enum<Empty.EmptyMSeq> implements MSeq<Object>
  • Enum Constant Details

  • Method Details

    • values

      public static Empty.EmptyMSeq[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Empty.EmptyMSeq valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • set

      public void set(int index, Object value)
      Description copied from interface: MSeq
      Set the value at the given index.
      Specified by:
      set in interface MSeq<Object>
      Parameters:
      index - the index of the new value.
      value - the new value.
    • sort

      public MSeq<Object> sort(int start, int end, Comparator<? super Object> comparator)
      Description copied from interface: MSeq
      Sorts this sequence according to the order induced by the specified Comparator.

      All elements in this sequence must be mutually comparable using the specified comparator (that is, c.compare(e1, e2) must not throw a ClassCastException for any elements e1 and e2 in the sequence).

      If the specified comparator is null then all elements in this list must implement the Comparable interface and the elements' Comparable natural ordering should be used.

      Specified by:
      sort in interface MSeq<Object>
      Parameters:
      start - the start index where to start sorting (inclusively)
      end - the end index where to stop sorting (exclusively)
      comparator - the Comparator used to compare sequence elements. A null value indicates that the elements' Comparable natural ordering should be used
      Returns:
      this sequence
    • listIterator

      Description copied from interface: MSeq
      Returns a list iterator over the elements in this sequence (in proper sequence).
      Specified by:
      listIterator in interface BaseSeq<Object>
      Specified by:
      listIterator in interface MSeq<Object>
      Returns:
      a list iterator over the elements in this list (in proper sequence)
    • subSeq

      public MSeq<Object> subSeq(int start, int end)
      Description copied from interface: Seq
      Returns a view of the portion of this sequence between the specified start, inclusive, and end, exclusive. (If start and end are equal, the returned sequence has the length zero.) The returned sequence is backed by this sequence, so non-structural changes in the returned sequence are reflected in this array, and vice-versa.

      This method eliminates the need for explicit range operations (of the populationSort that commonly exist for arrays). Any operation that expects an array can be used as a range operation by passing an sub sequence view instead of an whole sequence.

      Specified by:
      subSeq in interface MSeq<Object>
      Specified by:
      subSeq in interface Seq<Object>
      Parameters:
      start - low end point (inclusive) of the sub sequence.
      end - high end point (exclusive) of the sub sequence.
      Returns:
      a view of the specified range within this sequence.
    • subSeq

      public MSeq<Object> subSeq(int start)
      Description copied from interface: Seq
      Returns a view of the portion of this sequence between the specified start, inclusive, and end, exclusive. (If start and end are equal, the returned sequence has the length zero.) The returned sequence is backed by this sequence, so non-structural changes in the returned sequence are reflected in this sequence, and vice-versa.

      This method eliminates the need for explicit range operations (of the populationSort that commonly exist for arrays). Any operation that expects an sequence can be used as a range operation by passing an sub sequence view instead of an whole sequence.

      Specified by:
      subSeq in interface MSeq<Object>
      Specified by:
      subSeq in interface Seq<Object>
      Parameters:
      start - lower end point (inclusive) of the sub array.
      Returns:
      a view of the specified range within this array.
    • map

      public <B> MSeq<B> map(Function<? super Object,? extends B> mapper)
      Description copied from interface: Seq
      Builds a new sequence by applying a function to all elements of this sequence.
      Specified by:
      map in interface MSeq<Object>
      Specified by:
      map in interface Seq<Object>
      Type Parameters:
      B - the element type of the returned collection.
      Parameters:
      mapper - the function to apply to each element.
      Returns:
      a new sequence of type That resulting from applying the given function f to each element of this sequence and collecting the results.
    • append

      public MSeq<Object> append(Object... values)
      Description copied from interface: Seq
      Return a new Seq with the given values appended.
      Specified by:
      append in interface MSeq<Object>
      Specified by:
      append in interface Seq<Object>
      Parameters:
      values - the values to append
      Returns:
      a new Seq with the elements of this sequence and the given values appended.
    • append

      public MSeq<Object> append(Iterable<?> values)
      Description copied from interface: Seq
      Return a new Seq with the given values appended.
      Specified by:
      append in interface MSeq<Object>
      Specified by:
      append in interface Seq<Object>
      Parameters:
      values - the values to append
      Returns:
      a new Seq with the elements of this sequence and the given values appended.
    • prepend

      public MSeq<Object> prepend(Object... values)
      Description copied from interface: Seq
      Return a new Seq with the given values prepended.
      Specified by:
      prepend in interface MSeq<Object>
      Specified by:
      prepend in interface Seq<Object>
      Parameters:
      values - the values to append
      Returns:
      a new Seq with the elements of this sequence and the given values prepended.
    • prepend

      public MSeq<Object> prepend(Iterable<?> values)
      Description copied from interface: Seq
      Return a new Seq with the given values prepended.
      Specified by:
      prepend in interface MSeq<Object>
      Specified by:
      prepend in interface Seq<Object>
      Parameters:
      values - the values to append
      Returns:
      a new Seq with the elements of this sequence and the given values prepended.
    • stream

      public Stream<Object> stream()
      Description copied from interface: BaseSeq
      Returns a sequential Stream with this sequence as its source.
      Specified by:
      stream in interface BaseSeq<Object>
      Returns:
      a sequential Stream over the elements in this sequence
    • parallelStream

      Description copied from interface: Seq
      Returns a possibly parallel Stream with this sequence as its source. It is allowable for this method to return a sequential stream.
      Specified by:
      parallelStream in interface Seq<Object>
      Returns:
      a possibly parallel Stream over the elements in this collection
    • spliterator

      Specified by:
      spliterator in interface BaseSeq<Object>
      Specified by:
      spliterator in interface Iterable<Object>
    • toISeq

      public ISeq<Object> toISeq()
      Description copied from interface: MSeq
      Return a read-only projection of this sequence. Changes to the original sequence will not influence the returned ISeq.
      Specified by:
      toISeq in interface MSeq<Object>
      Returns:
      a read-only projection of this sequence
    • copy

      public MSeq<Object> copy()
      Description copied from interface: Copyable
      Return a new copy of type T.
      Specified by:
      copy in interface Copyable<MSeq<Object>>
      Returns:
      a new copy of type T.
    • get

      public Object get(int index)
      Description copied from interface: BaseSeq
      Return the value at the given index.
      Specified by:
      get in interface BaseSeq<Object>
      Parameters:
      index - index of the element to return.
      Returns:
      the value at the given index.
    • length

      public int length()
      Description copied from interface: BaseSeq
      Return the length of this sequence. Once the sequence is created, the length can't be changed.
      Specified by:
      length in interface BaseSeq<Object>
      Returns:
      the length of this sequence.
    • asList

      public List<Object> asList()
      Description copied from interface: Seq
      Returns a fixed-size list backed by the specified sequence. (Changes to the returned list "write through" to the array.) The returned list is fixed size, serializable and implements RandomAccess.
      Specified by:
      asList in interface MSeq<Object>
      Specified by:
      asList in interface Seq<Object>
      Returns:
      a list view of this sequence
    • iterator

      Specified by:
      iterator in interface BaseSeq<Object>
      Specified by:
      iterator in interface Iterable<Object>
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Empty.EmptyMSeq>