- 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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturn a newSeq
with the givenvalues
appended.Return a newSeq
with the givenvalues
appended.asList()
Returns a fixed-size list backed by the specified sequence.copy()
Return a new copy of typeT
.get
(int index) Return the value at the givenindex
.iterator()
int
length()
Return the length of this sequence.Returns a list iterator over the elements in this sequence (in a proper sequence).<B> MSeq<B>
Builds a new sequence by applying a function to all elements of this sequence.Returns a possibly parallelStream
with this sequence as its source.Return a newSeq
with the givenvalues
prepended.Return a newSeq
with the givenvalues
prepended.void
Set thevalue
at the givenindex
.sort
(int start, int end, Comparator<? super Object> comparator) Sorts this sequence according to the order induced by the specifiedComparator
.stream()
Returns a sequential Stream with this sequence as its source.subSeq
(int start) Returns a view of the portion of this sequence between the specifiedstart
, inclusive, andend
, exclusive.subSeq
(int start, int end) Returns a view of the portion of this sequence between the specifiedstart
, inclusive, andend
, exclusive.toISeq()
Return a read-only projection of this sequence.toString()
static Empty.EmptyMSeq
Returns the enum constant of this class with the specified name.static Empty.EmptyMSeq[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
Methods inherited from interface io.jenetics.util.MSeq
fill, reverse, setAll, setAll, setAll, shuffle, shuffle, sort, sort, sort, sort, sort, swap, swap, swap
Methods inherited from interface io.jenetics.util.Seq
apply, asISeq, asMSeq, contains, equals, forAll, hashCode, indexOf, indexOf, indexOf, indexWhere, indexWhere, indexWhere, isSorted, isSorted, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexWhere, lastIndexWhere, lastIndexWhere, size, toArray, toArray, toArray, toString, toString
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
set
Description copied from interface:MSeq
Set thevalue
at the givenindex
. -
sort
Description copied from interface:MSeq
Sorts this sequence according to the order induced by the specifiedComparator
.All elements in this sequence must be mutually comparable using the specified comparator (that is,
c.compare(e1, e2)
must not throw aClassCastException
for any elementse1
ande2
in the sequence).If the specified comparator is
null
then all elements in this list must implement theComparable
interface and the elements' Comparable natural ordering should be used.- Specified by:
sort
in interfaceMSeq<Object>
- Parameters:
start
- the start index where to start sorting (inclusively)end
- the end index where to stop sorting (exclusively)comparator
- theComparator
used to compare sequence elements. Anull
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 a proper sequence).- Specified by:
listIterator
in interfaceBaseSeq<Object>
- Specified by:
listIterator
in interfaceMSeq<Object>
- Returns:
- a list iterator over the elements in this list (in a proper sequence)
-
subSeq
Description copied from interface:Seq
Returns a view of the portion of this sequence between the specifiedstart
, inclusive, andend
, exclusive. (Ifstart
andend
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.
-
subSeq
Description copied from interface:Seq
Returns a view of the portion of this sequence between the specifiedstart
, inclusive, andend
, exclusive. (Ifstart
andend
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.
-
map
Description copied from interface:Seq
Builds a new sequence by applying a function to all elements of this sequence.- Specified by:
map
in interfaceMSeq<Object>
- Specified by:
map
in interfaceSeq<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
Description copied from interface:Seq
Return a newSeq
with the givenvalues
appended. -
append
Description copied from interface:Seq
Return a newSeq
with the givenvalues
appended. -
prepend
Description copied from interface:Seq
Return a newSeq
with the givenvalues
prepended. -
prepend
Description copied from interface:Seq
Return a newSeq
with the givenvalues
prepended. -
stream
Description copied from interface:BaseSeq
Returns a sequential Stream with this sequence as its source. -
parallelStream
Description copied from interface:Seq
Returns a possibly parallelStream
with this sequence as its source. It is allowable for this method to return a sequential stream.- Specified by:
parallelStream
in interfaceSeq<Object>
- Returns:
- a possibly parallel
Stream
over the elements in this collection
-
spliterator
- Specified by:
spliterator
in interfaceBaseSeq<Object>
- Specified by:
spliterator
in interfaceIterable<Object>
-
toISeq
Description copied from interface:MSeq
Return a read-only projection of this sequence. Changes to the original sequence will not influence the returnedISeq
. -
copy
Description copied from interface:Copyable
Return a new copy of typeT
. -
get
Description copied from interface:BaseSeq
Return the value at the givenindex
. -
length
Description copied from interface:BaseSeq
Return the length of this sequence. Once the sequence is created, the length can't be changed. -
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 implementsRandomAccess
. -
iterator
-
toString
- Overrides:
toString
in classEnum<Empty.EmptyMSeq>
-