Package io.karma.sliced.view.impl
Class ArrayFloatView
java.lang.Object
io.karma.sliced.view.impl.ArrayFloatView
- 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
@NotNull FloatIterator
Creates a newFloatIterator
from the elements referenced by this slice instance.int
hashCode()
int
size()
Retrieves the number of elements contained within the array/collection referenced by this array.float[]
Creates a newfloat
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 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
-
ArrayFloatView
public ArrayFloatView(float[] ref)
-
-
Method Details
-
floatIterator
Description copied from interface:FloatView
Creates a newFloatIterator
from the elements referenced by this slice instance.- Specified by:
floatIterator
in interfaceFloatView
- Returns:
- A new
FloatIterator
from the elements referenced by this slice instance.
-
toFloatArray
public float[] toFloatArray()Description copied from interface:FloatView
Creates a newfloat
array with the appropriate size, and copies all values into new newly created array usingSystem.arraycopy(Object, int, Object, int, int)
.- Specified by:
toFloatArray
in interfaceFloatView
- 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
-