Lazy and immutable slice of a sequence of values.
- Type Params
- T
type of the items of the sequence.
- Note
As the slice usually wraps over a mutable structure, like an array or a java buffer, and it DOES NOT make an instant copy, any changes to the underlying source will directly affect the slice output unless detached. Detach is a one-time copy operation, and
detached
property is preserved across all operations returning a Slice.- Companion
- object
Value members
Abstract methods
Detaches a slice creating a trimmed copy of an underlying data, if needed. Subsequent detach operations will return the same instance without making new copies.
Detaches a slice creating a trimmed copy of an underlying data, if needed. Subsequent detach operations will return the same instance without making new copies.
Lazily composes mapping function and returns new Slice. Does not modify nor copy underlying array.
Lazily composes mapping function and returns new Slice. Does not modify nor copy underlying array.
Concrete methods
Returns value at the given index.
Returns value at the given index.
- Definition Classes
- Function1
Dumps content to the array, starting from an index.
Dumps content to the array, starting from an index.
Lazily narrows Slice to exclude first N items.
Lazily narrows Slice to exclude first N items.
Returns true if any value fulfills the predicate, or false.
Returns true if any value fulfills the predicate, or false.
Returns Some of the first value fulfilling the predicate, or None.
Returns Some of the first value fulfilling the predicate, or None.
Combines from left to right all elements, starting with initial.
Combines from left to right all elements, starting with initial.
Folds from left to right all elements, starting with initial.
Folds from left to right all elements, starting with initial.
Folds from right to left all elements, starting with initial.
Folds from right to left all elements, starting with initial.
Returns Some of the value at the index, or None if index outside of range.
Returns Some of the value at the index, or None if index outside of range.
Returns iterator over Slice indexes of values fulfilling the predicate.
Returns iterator over Slice indexes of values fulfilling the predicate.
Returns true if Slice has values, otherwise false.
Returns true if Slice has values, otherwise false.
Returns iterator over Slice values fulfilling the predicate.
Returns iterator over Slice values fulfilling the predicate.
Returns true if Slice has values, otherwise false.
Returns true if Slice has values, otherwise false.
Returns iterator over Slice indexes of values fulfilling the predicate, in the reverse order.
Returns iterator over Slice indexes of values fulfilling the predicate, in the reverse order.
Returns iterator over Slice values in the reverse order.
Returns iterator over Slice values in the reverse order.
Returns iterator over Slice values fulfilling the predicate, in the reverse order.
Returns iterator over Slice values fulfilling the predicate, in the reverse order.