Package io.karma.sliced.view.impl
Class ArrayIntView
java.lang.Object
io.karma.sliced.view.impl.ArrayIntView
- Since:
- 04/09/2022
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionasSlice()
Creates a new slice instance from this view instance containing the same underlying collection reference, or a newly created wrapper list if there's no specialization available for the type of the underlying collection.boolean
int
hashCode()
@NotNull IntIterator
Creates a newIntIterator
from the elements referenced by this slice instance.Creates a newSpliterator.OfInt
from the elements referenced by this slice instance.int
size()
Retrieves the number of elements contained within the array/collection referenced by this array.int[]
Creates a newint
array with the appropriate size, and copies all values into new newly created array usingSystem.arraycopy(Object, int, Object, int, int)
.@NotNull String
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.karma.sliced.view.IntView
intStream, iterator, parallelIntStream
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface io.karma.sliced.view.View
contains, containsAll, containsAllRefs, containsRef, contentEquals, contentEquals, copy, copyArrayList, copyHashSet, forAll, forAllIndexed, forEachIndexed, parallelStream, referencesEqual, referencesEqual, stream, toArray
-
Constructor Details
-
ArrayIntView
public ArrayIntView(int[] ref)
-
-
Method Details
-
intIterator
Description copied from interface:IntView
Creates a newIntIterator
from the elements referenced by this slice instance.- Specified by:
intIterator
in interfaceIntView
- Returns:
- A new
IntIterator
from the elements referenced by this slice instance.
-
intSpliterator
Description copied from interface:IntView
Creates a newSpliterator.OfInt
from the elements referenced by this slice instance.- Specified by:
intSpliterator
in interfaceIntView
- Returns:
- A new
Spliterator.OfInt
from the elements referenced by this slice instance.
-
toIntArray
public int[] toIntArray()Description copied from interface:IntView
Creates a newint
array with the appropriate size, and copies all values into new newly created array usingSystem.arraycopy(Object, int, Object, int, int)
.- Specified by:
toIntArray
in interfaceIntView
- Returns:
- A new array containing all elements referenced by this slice instance.
-
size
public int size()Description copied from interface:View
Retrieves the number of elements contained within the array/collection referenced by this array. -
asSlice
Description copied from interface:View
Creates a new slice instance from this view instance containing the same underlying collection reference, or a newly created wrapper list if there's no specialization available for the type of the underlying collection. Note If you want to create slices directly, seeSlice.of(Object[])
and it's overloads. -
hashCode
public int hashCode() -
equals
-
toString
-