Slice
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, anddetached
property is
preserved across all operations returning a Slice. - Companion
- object
class ArraySlice[T]
trait ArraySliceLike[T]
class ByteSlice
class IntSlice
class LazyMapArraySlice[T]
class RangeMapSlice[T]
Document{}
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.
Subsequent detach operations will return the same instance without making new copies.