Top Description Inners Fields Methods
io.vavr.collection

pack-priv Interface ArrayType<T>

extends Serializable
Known Direct Implementers
io.vavr.collection.ArrayType.BooleanArrayType, io.vavr.collection.ArrayType.ByteArrayType, io.vavr.collection.ArrayType.CharArrayType, io.vavr.collection.ArrayType.DoubleArrayType, io.vavr.collection.ArrayType.FloatArrayType, io.vavr.collection.ArrayType.IntArrayType, io.vavr.collection.ArrayType.LongArrayType, io.vavr.collection.ArrayType.ShortArrayType, io.vavr.collection.ArrayType.ObjectArrayType
Imports
java.io.Serializable, java.util.Collection

Helper to replace reflective array access.
Author
Pap Lőrinc

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class

Field Summary

Modifier and TypeField and Description
public static final long

Method Summary

Modifier and TypeMethod and Description
public default Object
asArray(T element)

Create a single element array

public static Object[]
asArray(Iterator<?> it, int length)

Store the content of an iterable in an array

public static <T> T
asPrimitives(Class<?> primitiveClass, Iterable<?> values)

public Object
copy(Object array, int arraySize, int sourceFrom, int destinationFrom, int size)

public default Object
copy(Object array, int minLength)

public default Object
copyDrop(Object array, int index)

clone the source and keep everything after the index (pre-padding the values with null)

public default Object
copyRange(Object array, int from, int to)

System.arrayCopy with same source and destination

public default Object
copyTake(Object array, int lastIndex)

clone the source and keep everything before and including the index

public default Object
copyUpdate(Object array, int index, T element)

clone the source and set the value at the given position

public Object
public T
getAt(Object array, int index)

public default Object
grouped(Object array, int groupSize)

Repeatedly group an array into equal sized sub-trees

public int
public default Object
newInstance(int length)

public static <T> ArrayType<T>
obj()

public static <T> ArrayType<T>
of(Object array)

public static <T> ArrayType<T>
of(Class<T> type)

public static <T> ArrayType<T>
ofPrimitive(Class<T> type)

public void
setAt(Object array, int index, T value)

public Class<T>
type()