Class MutableListSlice<T,L extends List<T>>
java.lang.Object
io.karma.sliced.slice.mutable.impl.AbstractMutableSlice<T>
io.karma.sliced.slice.mutable.impl.MutableListSlice<T,L>
- All Implemented Interfaces:
MutableSlice<T>
,Slice<T>
,Resettable
,ResettableEnumeration<T>
,View<T>
,Iterable<T>
,Enumeration<T>
@API(status=INTERNAL)
public final class MutableListSlice<T,L extends List<T>>
extends AbstractMutableSlice<T>
- Since:
- 11/08/2022
-
Field Summary
Fields inherited from class io.karma.sliced.slice.mutable.impl.AbstractMutableSlice
offset, size
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
get
(int index) Retrieves an element of typeSlice
at the given index.int
hashCode()
boolean
iterator()
void
reset()
Resets the internal states of this object instance.slice
(int offset, int size) Creates a new sub-slice from this slice instance, with the given index range relative to the start index of this slice instance.@NotNull String
toString()
Methods inherited from class io.karma.sliced.slice.mutable.impl.AbstractMutableSlice
asSlice, offset, setOffset, setSize, size
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Enumeration
asIterator
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface io.karma.sliced.slice.Slice
copy, copy, copy, copyArrayList, copyHashSet, forEachIndexed, getOptional, getOrElse, getOrThrow, map, toArray, toArray
Methods inherited from interface io.karma.sliced.view.View
contains, containsAll, containsAllRefs, containsRef, contentEquals, contentEquals, copyArrayList, copyHashSet, forAll, forAllIndexed, parallelStream, referencesEqual, referencesEqual, stream
-
Constructor Details
-
MutableListSlice
-
-
Method Details
-
get
Description copied from interface:Slice
Retrieves an element of typeSlice
at the given index.- Parameters:
index
- The index of the element which to retrieve.- Returns:
- The element at the given index.
-
slice
Description copied from interface:Slice
Creates a new sub-slice from this slice instance, with the given index range relative to the start index of this slice instance.- Parameters:
offset
- The index at which the newly created slice should begin (relative to the offset of this slice).size
- The size of the newly created slice.- Returns:
- A new slice instance containing the same collection/array reference as this slice instance, but with the given relative index range.
-
iterator
-
hasMoreElements
public boolean hasMoreElements() -
nextElement
-
reset
public void reset()Description copied from interface:Resettable
Resets the internal states of this object instance. -
hashCode
public int hashCode() -
equals
-
toString
-