Lazy, specialized slice of the array of bytes.
Attributes
- Note
-
Truly immutable only if an underlying array kept private, or if detached.
- Companion
- object
- Graph
-
- Supertypes
-
trait ArraySliceLike[Byte]trait Slice[Byte]trait Int => Byteclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Returns a buffer with a copy of this Slice.
Inherited methods
Attributes
- Inherited from:
- Function1
Returns a trimmed copy of an underlying array.
Returns a trimmed copy of an underlying array.
Attributes
- Definition Classes
- Inherited from:
- ArraySliceLike
Returns new iterable of Slice values.
Attributes
- Inherited from:
- Function1
Dumps content to the array, starting from an index.
Dumps content to the array, starting from an index.
Attributes
- Definition Classes
- Inherited from:
- ArraySliceLike
Counts values fulfilling the predicate.
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.
Attributes
- Definition Classes
- Inherited from:
- ArraySliceLike
Lazily narrows Slice to exclude first N items.
Lazily narrows Slice to exclude last N items.
Compares the receiver object (this
) with the argument object (that
) for equivalence.
Compares the receiver object (this
) with the argument object (that
) for equivalence.
Any implementation of this method should be an equivalence relation:
- It is reflexive: for any instance
x
of typeAny
,x.equals(x)
should returntrue
. - It is symmetric: for any instances
x
andy
of typeAny
,x.equals(y)
should returntrue
if and only ify.equals(x)
returnstrue
. - It is transitive: for any instances
x
,y
, andz
of typeAny
ifx.equals(y)
returnstrue
andy.equals(z)
returnstrue
, thenx.equals(z)
should returntrue
.
If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is usually necessary to override hashCode
to ensure that objects which are "equal" (o1.equals(o2)
returns true
) hash to the same scala.Int. (o1.hashCode.equals(o2.hashCode)
).
Value parameters
- that
-
the object to compare against this object for equality.
Attributes
Returns true if any value fulfills the predicate, or false.
Returns Some of the first value fulfilling the predicate, or None.
Combines 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.
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.
Attributes
- Inherited from:
- Slice
Calculate a hash code value for the object.
Calculate a hash code value for the object.
The default hashing algorithm is platform dependent.
Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)
) yet not be equal (o1.equals(o2)
returns false
). A degenerate implementation could always return 0
. However, it is required that if two objects are equal (o1.equals(o2)
returns true
) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)
). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals
method.
Attributes
Returns first value in the Slice.
Returns first value in the Slice.
Returns iterator over Slice indexes of values fulfilling the predicate.
Returns iterator over Slice indexes of values fulfilling the predicate.
Attributes
- Inherited from:
- Slice
Returns the Slice without last value.
Returns true if Slice has values, otherwise false.
Returns iterator over Slice values fulfilling the predicate.
Returns iterator over Slice values.
Returns the last value in the Slice.
Returns the last value in the Slice.
Lazily composes mapping function and returns new LazyMapArraySlice. Does not modify nor copy underlying array.
Lazily composes mapping function and returns new LazyMapArraySlice. Does not modify nor copy underlying array.
Attributes
- Definition Classes
- Inherited from:
- ArraySliceLike
Returns true if Slice has values, otherwise false.
Returns value at the given index
Combines from right to left all elements.
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.
Attributes
- Inherited from:
- Slice
Returns iterator over Slice values fulfilling the predicate, in the reverse order.
Returns iterator over Slice values fulfilling the predicate, in the reverse order.
Attributes
- Inherited from:
- Slice
Returns iterator over Slice values in the reverse order.
Lazily narrows Slice to provided range.
Lazily narrows Slice to provided range.
Attributes
- Definition Classes
- Inherited from:
- ArraySliceLike
Returns the Slice without first value.
Lazily narrows Slice to first N items.
Lazily narrows Slice to last N items.
Returns a trimmed copy of an underlying array.
Returns new list of Slice values.
Returns new sequence of Slice values.
Returns top index value (length-1).
Creates a copy of the slice with modified value.
Creates a copy of the slice with modified value.
Attributes
- Definition Classes
- Inherited from:
- ArraySliceLike
Inherited fields
Sliced range length.