Enum Class Empty.EmptyISeq

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

public static enum Empty.EmptyISeq extends Enum<Empty.EmptyISeq> implements ISeq<Object>
  • Enum Constant Details

  • Method Details

    • values

      public static Empty.EmptyISeq[] 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.EmptyISeq 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
    • iterator

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

      public ISeq<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 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 a subsequence view instead of a whole sequence.

      Specified by:
      subSeq in interface ISeq<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 ISeq<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 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 a sequence can be used as a range operation by passing a sub-sequence view instead of a whole sequence.

      Specified by:
      subSeq in interface ISeq<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.
    • 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 Seq<Object>
      Returns:
      a list view of this sequence
    • map

      public <B> ISeq<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 ISeq<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 ISeq<Object> append(Object... values)
      Description copied from interface: Seq
      Return a new Seq with the given values appended.
      Specified by:
      append in interface ISeq<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 ISeq<Object> append(Iterable<?> values)
      Description copied from interface: Seq
      Return a new Seq with the given values appended.
      Specified by:
      append in interface ISeq<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 ISeq<Object> prepend(Object... values)
      Description copied from interface: Seq
      Return a new Seq with the given values prepended.
      Specified by:
      prepend in interface ISeq<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 ISeq<Object> prepend(Iterable<?> values)
      Description copied from interface: Seq
      Return a new Seq with the given values prepended.
      Specified by:
      prepend in interface ISeq<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>
    • copy

      public MSeq<Object> copy()
      Description copied from interface: ISeq
      Return a shallow copy of this sequence. The sequence elements are not cloned.
      Specified by:
      copy in interface Copyable<MSeq<Object>>
      Specified by:
      copy in interface ISeq<Object>
      Returns:
      a shallow copy of this sequence.
    • toString

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