Package io.vavr.collection
Interface ArrayType<T>
- All Known Implementing Classes:
ArrayType.BooleanArrayType
,ArrayType.ByteArrayType
,ArrayType.CharArrayType
,ArrayType.DoubleArrayType
,ArrayType.FloatArrayType
,ArrayType.IntArrayType
,ArrayType.LongArrayType
,ArrayType.ObjectArrayType
,ArrayType.ShortArrayType
interface ArrayType<T>
Helper to replace reflective array access.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
static final class
static final class
static final class
static final class
static final class
static final class
static final class
static final class
-
Method Summary
Modifier and TypeMethodDescriptionstatic Object[]
Store the content of an iterable in an arraydefault Object
Create a single element arraystatic <T> T
asPrimitives
(Class<?> primitiveClass, Iterable<?> values) default Object
default Object
clone the source and keep everything after the index (pre-padding the values with null)default Object
System.arrayCopy with same source and destinationdefault Object
clone the source and keep everything before and including the indexdefault Object
copyUpdate
(Object array, int index, T element) clone the source and set the value at the given positionempty()
default Object
Repeatedly group an array into equal sized sub-treesint
default Object
newInstance
(int length) static <T> ArrayType
<T> obj()
static <T> ArrayType
<T> static <T> ArrayType
<T> static <T> ArrayType
<T> ofPrimitive
(Class<T> type) void
type()
-
Method Details
-
obj
-
type
-
lengthOf
-
getAt
-
empty
Object empty() -
setAt
- Throws:
ClassCastException
-
copy
-
of
-
of
-
ofPrimitive
-
newInstance
-
copyRange
System.arrayCopy with same source and destination -
grouped
Repeatedly group an array into equal sized sub-trees -
copyUpdate
clone the source and set the value at the given position -
copy
-
copyDrop
clone the source and keep everything after the index (pre-padding the values with null) -
copyTake
clone the source and keep everything before and including the index -
asArray
Create a single element array -
asArray
Store the content of an iterable in an array -
asPrimitives
-