Package io.karma.sliced.view
Interface IntView
- All Known Subinterfaces:
IntSlice
,MutableIntSlice
- All Known Implementing Classes:
ArrayIntSlice
,ArrayIntView
,EmptyIntSlice
,EmptyIntView
,MutableArrayIntSlice
A primitive specialization for
int
of View
.- Since:
- 03/09/2022
-
Method Summary
Modifier and TypeMethodDescriptionstatic IntView
empty()
Creates an empty int view with no elements.@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.default @NotNull IntStream
Creates a new non-parallelIntStream
for the elements referenced by this slice instance.iterator()
static @NotNull IntView
of
(int... ref) default @NotNull IntStream
Creates a new parallelIntStream
for the elements referenced by this slice instance.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)
.Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface io.karma.sliced.view.View
asSlice, contains, containsAll, containsAllRefs, containsRef, contentEquals, contentEquals, copy, copyArrayList, copyHashSet, forAll, forAllIndexed, forEachIndexed, parallelStream, referencesEqual, referencesEqual, size, stream, toArray
-
Method Details
-
empty
Creates an empty int view with no elements.- Returns:
- An empty int view with no elements.
-
of
-
intIterator
Creates a newIntIterator
from the elements referenced by this slice instance.- Returns:
- A new
IntIterator
from the elements referenced by this slice instance.
-
intSpliterator
Creates a newSpliterator.OfInt
from the elements referenced by this slice instance.- Returns:
- A new
Spliterator.OfInt
from the elements referenced by this slice instance.
-
toIntArray
int[] toIntArray()Creates a newint
array with the appropriate size, and copies all values into new newly created array usingSystem.arraycopy(Object, int, Object, int, int)
.- Returns:
- A new array containing all elements referenced by this slice instance.
-
intStream
Creates a new non-parallelIntStream
for the elements referenced by this slice instance.- Returns:
- A new
IntStream
instance of all elements referenced by this slice instance.
-
parallelIntStream
Creates a new parallelIntStream
for the elements referenced by this slice instance.- Returns:
- A new
IntStream
instance of all elements referenced by this slice instance.
-
iterator
-