java.lang.Object
ArraySeq<T>
ArrayISeq<T>
- All Implemented Interfaces:
BaseSeq<T>
,Copyable<MSeq<T>>
,ISeq<T>
,Seq<T>
,Serializable
,Iterable<T>
,IntFunction<T>
,RandomAccess
- Direct Known Subclasses:
CharSeq
- Since:
- 1.4
- Version:
- 3.4
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturn a newSeq
with the givenvalues
appended.copy()
Return a shallow copy of this sequence.<B> ISeq<B>
Builds a new sequence by applying a function to all elements of this sequence.Return a newSeq
with the givenvalues
prepended.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.Methods inherited from class io.jenetics.internal.collection.ArraySeq
equals, forAll, forEach, get, hashCode, indexWhere, lastIndexWhere, length, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.jenetics.util.BaseSeq
forEach, get, isEmpty, iterator, length, listIterator, nonEmpty, spliterator, stream
Methods inherited from interface io.jenetics.util.Seq
apply, asISeq, asList, asMSeq, contains, equals, forAll, hashCode, indexOf, indexOf, indexOf, indexWhere, indexWhere, indexWhere, isSorted, isSorted, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexWhere, lastIndexWhere, lastIndexWhere, parallelStream, size, toArray, toArray, toArray, toString, toString
-
Constructor Details
-
ArrayISeq
-
-
Method Details
-
map
Description copied from interface:Seq
Builds a new sequence by applying a function to all elements of this sequence.- Specified by:
map
in interfaceISeq<T>
- Specified by:
map
in interfaceSeq<T>
- 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. -
prepend
Description copied from interface:Seq
Return a newSeq
with the givenvalues
prepended. -
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.
-
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.
-
copy
Description copied from interface:ISeq
Return a shallow copy of this sequence. The sequence elements are not cloned.
-