Interface ArrayFactory
-
public interface ArrayFactory
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ArrayFactory.FrameArrayType
-
Field Summary
Fields Modifier and Type Field Description static int
bitSetSwitchPoint
static org.apache.commons.logging.Log
LOG
-
Method Summary
Static Methods Modifier and Type Method Description static Array<?>
allocate(Types.ValueType v, int nRow)
static Array<?>
allocate(Types.ValueType v, int nRow, String val)
static ABooleanArray
allocateBoolean(int nRow)
static Array<?>
allocateOptional(Types.ValueType v, int nRow)
static <C> Array<C>
append(Array<?> a, Array<?> b)
append arrays to each other, and cast to highest common type if different types.static BooleanArray
create(boolean[] col)
static CharArray
create(char[] col)
static DoubleArray
create(double[] col)
static FloatArray
create(float[] col)
static IntegerArray
create(int[] col)
static LongArray
create(long[] col)
static StringArray
create(String[] col)
static BitSetArray
create(BitSet col, int size)
static <T> OptionalArray<T>
create(T[] col)
static <T> RaggedArray<T>
create(T[] col, int m)
static HashLongArray
createHash64(long[] col)
static HashLongArray
createHash64(String[] col)
static OptionalArray<Object>
createHash64Opt(String[] col)
static Object
defaultNullValue(Types.ValueType v)
static long
getInMemorySize(Types.ValueType type, int _numRows, boolean containsNull)
static Object
parseString(String s, Types.ValueType v)
static Array<?>
read(DataInput in, int nRow)
static <C> Array<C>
set(Array<?> target, Array<?> src, int rl, int ru, int rlen)
Set the target array in the range of rl to ru with the src array.
-
-
-
Field Detail
-
LOG
static final org.apache.commons.logging.Log LOG
-
bitSetSwitchPoint
static final int bitSetSwitchPoint
- See Also:
- Constant Field Values
-
-
Method Detail
-
create
static StringArray create(String[] col)
-
createHash64
static HashLongArray createHash64(String[] col)
-
createHash64Opt
static OptionalArray<Object> createHash64Opt(String[] col)
-
createHash64
static HashLongArray createHash64(long[] col)
-
create
static BooleanArray create(boolean[] col)
-
create
static BitSetArray create(BitSet col, int size)
-
create
static IntegerArray create(int[] col)
-
create
static LongArray create(long[] col)
-
create
static FloatArray create(float[] col)
-
create
static DoubleArray create(double[] col)
-
create
static CharArray create(char[] col)
-
create
static <T> OptionalArray<T> create(T[] col)
-
create
static <T> RaggedArray<T> create(T[] col, int m)
-
getInMemorySize
static long getInMemorySize(Types.ValueType type, int _numRows, boolean containsNull)
-
allocate
static Array<?> allocate(Types.ValueType v, int nRow, String val)
-
allocateOptional
static Array<?> allocateOptional(Types.ValueType v, int nRow)
-
allocateBoolean
static ABooleanArray allocateBoolean(int nRow)
-
allocate
static Array<?> allocate(Types.ValueType v, int nRow)
-
read
static Array<?> read(DataInput in, int nRow) throws IOException
- Throws:
IOException
-
append
static <C> Array<C> append(Array<?> a, Array<?> b)
append arrays to each other, and cast to highest common type if different types.- Type Parameters:
C
- The type to return, java automatically make this Object, and this is fine.- Parameters:
a
- The first array to append to (potentially modifying this a if applicable)b
- The array to append to a, (not getting modified).- Returns:
- A array containing the concatenation of the two.
-
set
static <C> Array<C> set(Array<?> target, Array<?> src, int rl, int ru, int rlen)
Set the target array in the range of rl to ru with the src array. The type returned is the common or highest common type of array.- Type Parameters:
C
- The highest common type to return.- Parameters:
target
- The target to put the values intosrc
- The source to take the values fromrl
- The index to start onru
- The index to end on (inclusive)rlen
- The length of the target (a parameter in case target is null)- Returns:
- A new or modified array.
-
parseString
static Object parseString(String s, Types.ValueType v)
-
defaultNullValue
static Object defaultNullValue(Types.ValueType v)
-
-