Package io.karma.sliced.slice.mutable
Interface MutableLongSlice
- All Superinterfaces:
Enumeration<Long>
,Iterable<Long>
,LongSlice
,LongView
,MutableSlice<Long>
,Resettable
,ResettableEnumeration<Long>
,Slice<Long>
,View<Long>
- All Known Implementing Classes:
MutableArrayLongSlice
A mutable slice is a subtype of a regular
LongSlice
,
which allows mutating the start- and end-index of the slice.
This allows the reduction of allocation overhead in loops for example.- Since:
- 25/08/2022
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull MutableLongSlice
of
(long... ref) Creates a new mutable slice instance which references the given array.static @NotNull MutableLongSlice
of
(long[] ref, int offset, int size) Creates a new mutable slice instance which references the given array.Methods inherited from interface java.util.Enumeration
asIterator, hasMoreElements, nextElement
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface io.karma.sliced.slice.LongSlice
asSlice, get, getLong, map, toLongArray, toLongArray
Methods inherited from interface io.karma.sliced.view.LongView
iterator, longIterator, longSpliterator, longStream, parallelLongStream
Methods inherited from interface io.karma.sliced.slice.mutable.MutableSlice
setOffset, setSize
Methods inherited from interface io.karma.sliced.util.Resettable
reset
Methods inherited from interface io.karma.sliced.slice.Slice
copy, copy, copy, copyArrayList, copyHashSet, forEachIndexed, getOptional, getOrElse, getOrThrow, map, offset, slice, toArray, toArray
Methods inherited from interface io.karma.sliced.view.View
contains, containsAll, containsAllRefs, containsRef, contentEquals, contentEquals, copyArrayList, copyHashSet, forAll, forAllIndexed, parallelStream, referencesEqual, referencesEqual, size, stream
-
Method Details
-
of
Creates a new mutable slice instance which references the given array.- Parameters:
ref
- The array of which to create a slice.offset
- The index at which the newly created slice should begin.size
- The size of the newly created slice.- Returns:
- A new mutable slice instance, which references the given array.
-
of
Creates a new mutable slice instance which references the given array.- Parameters:
ref
- The array of which to create a slice.- Returns:
- A new mutable slice instance, which references the given array.
-