public class ValueArrayFactory extends Object
ValueArray
types is necessary because the contained Value
types do not currently implement a common interface for creating a ValueArray
. Algorithms
must instantiate classes at runtime when the type information has been erased.
This mirrors creating Value
using CopyableValue.copy()
.
Constructor and Description |
---|
ValueArrayFactory() |
Modifier and Type | Method and Description |
---|---|
static <T> ValueArray<T> |
createValueArray(Class<? extends Value> cls)
Produce a
ValueArray for the given Value type. |
static <T> ValueArray<T> |
createValueArray(Class<? extends Value> cls,
int bytes)
Produce a
ValueArray for the given Value type with the given bounded size. |
public static <T> ValueArray<T> createValueArray(Class<? extends Value> cls)
ValueArray
for the given Value
type.cls
- Value
classValueArray
for given Value
classpublic static <T> ValueArray<T> createValueArray(Class<? extends Value> cls, int bytes)
ValueArray
for the given Value
type with the given bounded size.cls
- Value
classbytes
- limit the array to the given number of bytesValueArray
for given Value
classCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.