Lazily mapped slice of an underlying array.
Type parameters
- T
-
type of the array's items
Attributes
- Note
-
Truly immutable only if an underlying array kept private, or if detached.
- Companion
- object
- Graph
-
- Supertypes
Members list
Type members
Types
Type of the underlying array items.
Type of the underlying array items.
Attributes
Value members
Concrete methods
Returns an array of mapped values.
Returns a buffer with a copy of this Slice.
Detaches a slice creating a trimmed copy of an underlying data.
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.
Attributes
- Definition Classes
Lazily narrows Slice to provided range.
Returns buffer with a copy of this Slice.
Inherited methods
Attributes
- Inherited from:
- Function1
Returns new iterable of Slice values.
Attributes
- Inherited from:
- Function1
Dumps content to the array, starting from an index.
Counts values fulfilling the predicate.
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
Calculates a hash code value for the object.
Calculates 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.
Returns true if Slice has values, otherwise false.
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.
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.
Concrete fields
Sliced range length.
Sliced range length.