Class Basic

java.lang.Object
io.deephaven.function.Basic

public class Basic extends Object
Basic functions that can be applied to primitive types.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static byte[]
    array(ByteVector values)
    Converts a Deephaven vector to a primitive array that may be freely mutated by the caller.
    static char[]
    array(CharVector values)
    Converts a Deephaven vector to a primitive array that may be freely mutated by the caller.
    static double[]
    Converts a Deephaven vector to a primitive array that may be freely mutated by the caller.
    static float[]
    Converts a Deephaven vector to a primitive array that may be freely mutated by the caller.
    static int[]
    array(IntVector values)
    Converts a Deephaven vector to a primitive array that may be freely mutated by the caller.
    static long[]
    array(LongVector values)
    Converts a Deephaven vector to a primitive array that may be freely mutated by the caller.
    static short[]
    Converts a Deephaven vector to a primitive array that may be freely mutated by the caller.
    static <T> T[]
    Converts a Deephaven vector to an array that may be freely mutated by the caller.
    static byte[]
    concat(byte[]... values)
    Returns the concatenation of multiple arrays into a single array.
    static char[]
    concat(char[]... values)
    Returns the concatenation of multiple arrays into a single array.
    static double[]
    concat(double[]... values)
    Returns the concatenation of multiple arrays into a single array.
    static float[]
    concat(float[]... values)
    Returns the concatenation of multiple arrays into a single array.
    static int[]
    concat(int[]... values)
    Returns the concatenation of multiple arrays into a single array.
    static long[]
    concat(long[]... values)
    Returns the concatenation of multiple arrays into a single array.
    static short[]
    concat(short[]... values)
    Returns the concatenation of multiple arrays into a single array.
    static byte[]
    concat(ByteVector... values)
    Returns the concatenation of multiple arrays into a single array.
    static char[]
    concat(CharVector... values)
    Returns the concatenation of multiple arrays into a single array.
    static double[]
    concat(DoubleVector... values)
    Returns the concatenation of multiple arrays into a single array.
    static float[]
    concat(FloatVector... values)
    Returns the concatenation of multiple arrays into a single array.
    static int[]
    concat(IntVector... values)
    Returns the concatenation of multiple arrays into a single array.
    static long[]
    concat(LongVector... values)
    Returns the concatenation of multiple arrays into a single array.
    static <T> T[]
    concat(ObjectVector<T>... values)
    Returns the concatenation of multiple arrays into a single array.
    static short[]
    concat(ShortVector... values)
    Returns the concatenation of multiple arrays into a single array.
    static <T> T[]
    concat(T[]... values)
    Returns the concatenation of multiple arrays into a single array.
    static long
    count(byte... values)
    Counts the number of non-null values.
    static long
    count(char... values)
    Counts the number of non-null values.
    static long
    count(double... values)
    Counts the number of non-null values.
    static long
    count(float... values)
    Counts the number of non-null values.
    static long
    count(int... values)
    Counts the number of non-null values.
    static long
    count(long... values)
    Counts the number of non-null values.
    static long
    count(short... values)
    Counts the number of non-null values.
    static long
    count(ByteVector values)
    Counts the number of non-null values.
    static long
    count(CharVector values)
    Counts the number of non-null values.
    static long
    Counts the number of non-null values.
    static long
    Counts the number of non-null values.
    static long
    count(IntVector values)
    Counts the number of non-null values.
    static long
    count(LongVector values)
    Counts the number of non-null values.
    static long
    Counts the number of non-null values.
    static long
    countDistinct(byte... values)
    Counts the number of distinct elements in the array.
    static long
    countDistinct(byte[] values, boolean countNull)
    Counts the number of distinct elements in the array.
    static long
    countDistinct(char... values)
    Counts the number of distinct elements in the array.
    static long
    countDistinct(char[] values, boolean countNull)
    Counts the number of distinct elements in the array.
    static long
    countDistinct(double... values)
    Counts the number of distinct elements in the array.
    static long
    countDistinct(double[] values, boolean countNull)
    Counts the number of distinct elements in the array.
    static long
    countDistinct(float... values)
    Counts the number of distinct elements in the array.
    static long
    countDistinct(float[] values, boolean countNull)
    Counts the number of distinct elements in the array.
    static long
    countDistinct(int... values)
    Counts the number of distinct elements in the array.
    static long
    countDistinct(int[] values, boolean countNull)
    Counts the number of distinct elements in the array.
    static long
    countDistinct(long... values)
    Counts the number of distinct elements in the array.
    static long
    countDistinct(long[] values, boolean countNull)
    Counts the number of distinct elements in the array.
    static long
    countDistinct(short... values)
    Counts the number of distinct elements in the array.
    static long
    countDistinct(short[] values, boolean countNull)
    Counts the number of distinct elements in the array.
    static long
    Counts the number of distinct elements in the array.
    static long
    countDistinct(ByteVector values, boolean countNull)
    Counts the number of distinct elements in the array.
    static long
    Counts the number of distinct elements in the array.
    static long
    countDistinct(CharVector values, boolean countNull)
    Counts the number of distinct elements in the array.
    static long
    Counts the number of distinct elements in the array.
    static long
    countDistinct(DoubleVector values, boolean countNull)
    Counts the number of distinct elements in the array.
    static long
    Counts the number of distinct elements in the array.
    static long
    countDistinct(FloatVector values, boolean countNull)
    Counts the number of distinct elements in the array.
    static long
    Counts the number of distinct elements in the array.
    static long
    countDistinct(IntVector values, boolean countNull)
    Counts the number of distinct elements in the array.
    static long
    Counts the number of distinct elements in the array.
    static long
    countDistinct(LongVector values, boolean countNull)
    Counts the number of distinct elements in the array.
    static long
    Counts the number of distinct elements in the array.
    static long
    countDistinct(ShortVector values, boolean countNull)
    Counts the number of distinct elements in the array.
    static <T extends Comparable<? super T>>
    long
    Counts the number of distinct elements in the array.
    static <T extends Comparable<? super T>>
    long
    countDistinctObj(ObjectVector<T> values, boolean countNull)
    Counts the number of distinct elements in the array.
    static <T extends Comparable<? super T>>
    long
    countDistinctObj(T... values)
    Counts the number of distinct elements in the array.
    static <T extends Comparable<? super T>>
    long
    countDistinctObj(T[] values, boolean countNull)
    Counts the number of distinct elements in the array.
    static <T> long
    Counts the number of non-null values.
    static <T> long
    countObj(T... values)
    Counts the number of non-null values.
    static byte[]
    distinct(byte... values)
    Returns an array containing only the distinct values from the input.
    static byte[]
    distinct(byte[] values, boolean includeNull)
    Returns an array containing only the distinct values from the input.
    static char[]
    distinct(char... values)
    Returns an array containing only the distinct values from the input.
    static char[]
    distinct(char[] values, boolean includeNull)
    Returns an array containing only the distinct values from the input.
    static double[]
    distinct(double... values)
    Returns an array containing only the distinct values from the input.
    static double[]
    distinct(double[] values, boolean includeNull)
    Returns an array containing only the distinct values from the input.
    static float[]
    distinct(float... values)
    Returns an array containing only the distinct values from the input.
    static float[]
    distinct(float[] values, boolean includeNull)
    Returns an array containing only the distinct values from the input.
    static int[]
    distinct(int... values)
    Returns an array containing only the distinct values from the input.
    static int[]
    distinct(int[] values, boolean includeNull)
    Returns an array containing only the distinct values from the input.
    static long[]
    distinct(long... values)
    Returns an array containing only the distinct values from the input.
    static long[]
    distinct(long[] values, boolean includeNull)
    Returns an array containing only the distinct values from the input.
    static short[]
    distinct(short... values)
    Returns an array containing only the distinct values from the input.
    static short[]
    distinct(short[] values, boolean includeNull)
    Returns an array containing only the distinct values from the input.
    static byte[]
    Returns an array containing only the distinct values from the input.
    static byte[]
    distinct(ByteVector values, boolean includeNull)
    Returns an array containing only the distinct values from the input.
    static char[]
    Returns an array containing only the distinct values from the input.
    static char[]
    distinct(CharVector values, boolean includeNull)
    Returns an array containing only the distinct values from the input.
    static double[]
    Returns an array containing only the distinct values from the input.
    static double[]
    distinct(DoubleVector values, boolean includeNull)
    Returns an array containing only the distinct values from the input.
    static float[]
    Returns an array containing only the distinct values from the input.
    static float[]
    distinct(FloatVector values, boolean includeNull)
    Returns an array containing only the distinct values from the input.
    static int[]
    Returns an array containing only the distinct values from the input.
    static int[]
    distinct(IntVector values, boolean includeNull)
    Returns an array containing only the distinct values from the input.
    static long[]
    Returns an array containing only the distinct values from the input.
    static long[]
    distinct(LongVector values, boolean includeNull)
    Returns an array containing only the distinct values from the input.
    static short[]
    Returns an array containing only the distinct values from the input.
    static short[]
    distinct(ShortVector values, boolean includeNull)
    Returns an array containing only the distinct values from the input.
    static <T extends Comparable<? super T>>
    T[]
    Returns an array containing only the distinct values from the input.
    static <T extends Comparable<? super T>>
    T[]
    distinctObj(ObjectVector<T> values, boolean includeNull)
    Returns an array containing only the distinct values from the input.
    static <T extends Comparable<? super T>>
    T[]
    distinctObj(T... values)
    Returns an array containing only the distinct values from the input.
    static <T extends Comparable<? super T>>
    T[]
    distinctObj(T[] values, boolean includeNull)
    Returns an array containing only the distinct values from the input.
    static byte[]
    enlist(byte... values)
    Returns a list containing its arguments.
    static char[]
    enlist(char... values)
    Returns a list containing its arguments.
    static double[]
    enlist(double... values)
    Returns a list containing its arguments.
    static float[]
    enlist(float... values)
    Returns a list containing its arguments.
    static int[]
    enlist(int... values)
    Returns a list containing its arguments.
    static long[]
    enlist(long... values)
    Returns a list containing its arguments.
    static short[]
    enlist(short... values)
    Returns a list containing its arguments.
    static byte
    first(byte... values)
    Returns the first value from an array.
    static char
    first(char... values)
    Returns the first value from an array.
    static double
    first(double... values)
    Returns the first value from an array.
    static float
    first(float... values)
    Returns the first value from an array.
    static int
    first(int... values)
    Returns the first value from an array.
    static long
    first(long... values)
    Returns the first value from an array.
    static short
    first(short... values)
    Returns the first value from an array.
    static byte
    first(ByteVector values)
    Returns the first value from an array.
    static char
    first(CharVector values)
    Returns the first value from an array.
    static double
    Returns the first value from an array.
    static float
    Returns the first value from an array.
    static int
    first(IntVector values)
    Returns the first value from an array.
    static long
    first(LongVector values)
    Returns the first value from an array.
    static short
    Returns the first value from an array.
    static long
    firstIndexOf(byte val, byte... values)
    Returns the first index containing the value.
    static long
    firstIndexOf(byte val, ByteVector values)
    Returns the first index containing the value.
    static long
    firstIndexOf(char val, char... values)
    Returns the first index containing the value.
    static long
    firstIndexOf(char val, CharVector values)
    Returns the first index containing the value.
    static long
    firstIndexOf(double val, double... values)
    Returns the first index containing the value.
    static long
    firstIndexOf(double val, DoubleVector values)
    Returns the first index containing the value.
    static long
    firstIndexOf(float val, float... values)
    Returns the first index containing the value.
    static long
    firstIndexOf(float val, FloatVector values)
    Returns the first index containing the value.
    static long
    firstIndexOf(int val, int... values)
    Returns the first index containing the value.
    static long
    firstIndexOf(int val, IntVector values)
    Returns the first index containing the value.
    static long
    firstIndexOf(long val, long... values)
    Returns the first index containing the value.
    static long
    firstIndexOf(long val, LongVector values)
    Returns the first index containing the value.
    static long
    firstIndexOf(short val, short... values)
    Returns the first index containing the value.
    static long
    firstIndexOf(short val, ShortVector values)
    Returns the first index containing the value.
    static <T> long
    firstIndexOfObj(T val, ObjectVector<T> values)
    Returns the first index containing the value.
    static <T> long
    firstIndexOfObj(T val, T... values)
    Returns the first index containing the value.
    static <T> T
    Returns the first value from an array.
    static <T> T
    firstObj(T... values)
    Returns the first value from an array.
    static byte[]
    forwardFill(byte... values)
    Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists.
    static char[]
    forwardFill(char... values)
    Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists.
    static double[]
    forwardFill(double... values)
    Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists.
    static float[]
    forwardFill(float... values)
    Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists.
    static int[]
    forwardFill(int... values)
    Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists.
    static long[]
    forwardFill(long... values)
    Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists.
    static short[]
    forwardFill(short... values)
    Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists.
    static byte[]
    Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists.
    static char[]
    Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists.
    static double[]
    Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists.
    static float[]
    Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists.
    static int[]
    Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists.
    static long[]
    Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists.
    static short[]
    Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists.
    static <T> T[]
    Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists.
    static <T> T[]
    forwardFillObj(T... values)
    Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists.
    static byte[]
    ifelse(ObjectVector<Boolean> condition, byte trueCase, byte falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static char[]
    ifelse(ObjectVector<Boolean> condition, char trueCase, char falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static double[]
    ifelse(ObjectVector<Boolean> condition, double trueCase, double falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static float[]
    ifelse(ObjectVector<Boolean> condition, float trueCase, float falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static int[]
    ifelse(ObjectVector<Boolean> condition, int trueCase, int falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static long[]
    ifelse(ObjectVector<Boolean> condition, long trueCase, long falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static short[]
    ifelse(ObjectVector<Boolean> condition, short trueCase, short falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static byte[]
    ifelse(ObjectVector<Boolean> condition, ByteVector trueCase, ByteVector falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static char[]
    ifelse(ObjectVector<Boolean> condition, CharVector trueCase, CharVector falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static double[]
    ifelse(ObjectVector<Boolean> condition, DoubleVector trueCase, DoubleVector falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static float[]
    ifelse(ObjectVector<Boolean> condition, FloatVector trueCase, FloatVector falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static int[]
    ifelse(ObjectVector<Boolean> condition, IntVector trueCase, IntVector falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static long[]
    ifelse(ObjectVector<Boolean> condition, LongVector trueCase, LongVector falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static short[]
    ifelse(ObjectVector<Boolean> condition, ShortVector trueCase, ShortVector falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static byte[]
    ifelse(Boolean[] condition, byte[] trueCase, byte[] falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static byte[]
    ifelse(Boolean[] condition, byte trueCase, byte falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static char[]
    ifelse(Boolean[] condition, char[] trueCase, char[] falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static char[]
    ifelse(Boolean[] condition, char trueCase, char falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static double[]
    ifelse(Boolean[] condition, double[] trueCase, double[] falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static double[]
    ifelse(Boolean[] condition, double trueCase, double falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static float[]
    ifelse(Boolean[] condition, float[] trueCase, float[] falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static float[]
    ifelse(Boolean[] condition, float trueCase, float falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static int[]
    ifelse(Boolean[] condition, int[] trueCase, int[] falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static int[]
    ifelse(Boolean[] condition, int trueCase, int falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static long[]
    ifelse(Boolean[] condition, long[] trueCase, long[] falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static long[]
    ifelse(Boolean[] condition, long trueCase, long falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static short[]
    ifelse(Boolean[] condition, short[] trueCase, short[] falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static short[]
    ifelse(Boolean[] condition, short trueCase, short falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static byte
    ifelse(Boolean condition, byte trueCase, byte falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static char
    ifelse(Boolean condition, char trueCase, char falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static double
    ifelse(Boolean condition, double trueCase, double falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static float
    ifelse(Boolean condition, float trueCase, float falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static int
    ifelse(Boolean condition, int trueCase, int falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static long
    ifelse(Boolean condition, long trueCase, long falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static short
    ifelse(Boolean condition, short trueCase, short falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static <T> T[]
    ifelseObj(ObjectVector<Boolean> condition, ObjectVector<T> trueCase, ObjectVector<T> falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static <T> T[]
    ifelseObj(ObjectVector<Boolean> condition, T trueCase, T falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static <T> T[]
    ifelseObj(Boolean[] condition, T[] trueCase, T[] falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static <T> T[]
    ifelseObj(Boolean[] condition, T trueCase, T falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static <T> T
    ifelseObj(Boolean condition, T trueCase, T falseCase)
    Returns elements from either trueCase or falseCase, depending on condition.
    static boolean
    in(byte testedValues, byte... possibleValues)
    Checks if a value is within a discrete set of possible values.
    static boolean
    in(char testedValues, char... possibleValues)
    Checks if a value is within a discrete set of possible values.
    static boolean
    in(double testedValues, double... possibleValues)
    Checks if a value is within a discrete set of possible values.
    static boolean
    in(float testedValues, float... possibleValues)
    Checks if a value is within a discrete set of possible values.
    static boolean
    in(int testedValues, int... possibleValues)
    Checks if a value is within a discrete set of possible values.
    static boolean
    in(long testedValues, long... possibleValues)
    Checks if a value is within a discrete set of possible values.
    static boolean
    in(short testedValues, short... possibleValues)
    Checks if a value is within a discrete set of possible values.
    static <T> boolean
    inObj(T testedValue, ObjectVector<T> possibleValues)
    Checks if a value is within a discrete set of possible values.
    static <T> boolean
    inObj(T testedValue, T... possibleValues)
    Checks if a value is within a discrete set of possible values.
    static boolean
    inRange(byte testedValue, byte lowInclusiveValue, byte highInclusiveValue)
    Checks if a value is within a range.
    static boolean
    inRange(char testedValue, char lowInclusiveValue, char highInclusiveValue)
    Checks if a value is within a range.
    static boolean
    inRange(double testedValue, double lowInclusiveValue, double highInclusiveValue)
    Checks if a value is within a range.
    static boolean
    inRange(float testedValue, float lowInclusiveValue, float highInclusiveValue)
    Checks if a value is within a range.
    static boolean
    inRange(int testedValue, int lowInclusiveValue, int highInclusiveValue)
    Checks if a value is within a range.
    static boolean
    inRange(long testedValue, long lowInclusiveValue, long highInclusiveValue)
    Checks if a value is within a range.
    static boolean
    inRange(short testedValue, short lowInclusiveValue, short highInclusiveValue)
    Checks if a value is within a range.
    static <T extends Comparable<? super T>>
    boolean
    inRange(T testedValue, T lowInclusiveValue, T highInclusiveValue)
    Checks if a value is within a range.
    static boolean
    isNull(byte value)
    Determines if a value is considered by the Deephaven convention to be null.
    static boolean
    isNull(char value)
    Determines if a value is considered by the Deephaven convention to be null.
    static boolean
    isNull(double value)
    Determines if a value is considered by the Deephaven convention to be null.
    static boolean
    isNull(float value)
    Determines if a value is considered by the Deephaven convention to be null.
    static boolean
    isNull(int value)
    Determines if a value is considered by the Deephaven convention to be null.
    static boolean
    isNull(long value)
    Determines if a value is considered by the Deephaven convention to be null.
    static boolean
    isNull(short value)
    Determines if a value is considered by the Deephaven convention to be null.
    static <T> boolean
    isNull(T value)
    Determines if a value is considered by the Deephaven convention to be null.
    static byte
    last(byte... values)
    Returns the last value from an array.
    static char
    last(char... values)
    Returns the last value from an array.
    static double
    last(double... values)
    Returns the last value from an array.
    static float
    last(float... values)
    Returns the last value from an array.
    static int
    last(int... values)
    Returns the last value from an array.
    static long
    last(long... values)
    Returns the last value from an array.
    static short
    last(short... values)
    Returns the last value from an array.
    static byte
    last(ByteVector values)
    Returns the last value from an array.
    static char
    last(CharVector values)
    Returns the last value from an array.
    static double
    Returns the last value from an array.
    static float
    last(FloatVector values)
    Returns the last value from an array.
    static int
    last(IntVector values)
    Returns the last value from an array.
    static long
    last(LongVector values)
    Returns the last value from an array.
    static short
    last(ShortVector values)
    Returns the last value from an array.
    static <T> T
    lastObj(ObjectVector<T> values)
    Returns the last value from an array.
    static <T> T
    lastObj(T... values)
    Returns the last value from an array.
    static long
    len(byte[] values)
    Returns the length of the input.
    static long
    len(char[] values)
    Returns the length of the input.
    static long
    len(double[] values)
    Returns the length of the input.
    static long
    len(float[] values)
    Returns the length of the input.
    static long
    len(int[] values)
    Returns the length of the input.
    static long
    len(long[] values)
    Returns the length of the input.
    static long
    len(short[] values)
    Returns the length of the input.
    static long
    Returns the length of the input.
    static <T> long
    len(T[] values)
    Returns the length of the input.
    static byte
    nth(long index, byte... values)
    Returns the nth value from an array.
    static char
    nth(long index, char... values)
    Returns the nth value from an array.
    static double
    nth(long index, double... values)
    Returns the nth value from an array.
    static float
    nth(long index, float... values)
    Returns the nth value from an array.
    static int
    nth(long index, int... values)
    Returns the nth value from an array.
    static long
    nth(long index, long... values)
    Returns the nth value from an array.
    static short
    nth(long index, short... values)
    Returns the nth value from an array.
    static byte
    nth(long index, ByteVector values)
    Returns the nth value from an array.
    static char
    nth(long index, CharVector values)
    Returns the nth value from an array.
    static double
    nth(long index, DoubleVector values)
    Returns the nth value from an array.
    static float
    nth(long index, FloatVector values)
    Returns the nth value from an array.
    static int
    nth(long index, IntVector values)
    Returns the nth value from an array.
    static long
    nth(long index, LongVector values)
    Returns the nth value from an array.
    static short
    nth(long index, ShortVector values)
    Returns the nth value from an array.
    static <T> T
    nthObj(long index, ObjectVector<T> values)
    Returns the nth value from an array.
    static <T> T
    nthObj(long index, T... values)
    Returns the nth value from an array.
    static <T> T
    nullValueFor(Class<T> clazz)
    Returns the null value in the Deephaven convention that corresponds to type T.
    static byte[]
    repeat(byte value, int size)
    Returns an array with a value repeated.
    static char[]
    repeat(char value, int size)
    Returns an array with a value repeated.
    static double[]
    repeat(double value, int size)
    Returns an array with a value repeated.
    static float[]
    repeat(float value, int size)
    Returns an array with a value repeated.
    static int[]
    repeat(int value, int size)
    Returns an array with a value repeated.
    static long[]
    repeat(long value, int size)
    Returns an array with a value repeated.
    static short[]
    repeat(short value, int size)
    Returns an array with a value repeated.
    static <T> T[]
    repeat(T value, int size)
    Returns an array with a value repeated.
    static byte[]
    replaceIfNull(byte[] values, byte replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static byte
    replaceIfNull(byte value, byte replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static char[]
    replaceIfNull(char[] values, char replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static char
    replaceIfNull(char value, char replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static double[]
    replaceIfNull(double[] values, double replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static double
    replaceIfNull(double value, double replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static float[]
    replaceIfNull(float[] values, float replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static float
    replaceIfNull(float value, float replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static int[]
    replaceIfNull(int[] values, int replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static int
    replaceIfNull(int value, int replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static long[]
    replaceIfNull(long[] values, long replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static long
    replaceIfNull(long value, long replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static short[]
    replaceIfNull(short[] values, short replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static short
    replaceIfNull(short value, short replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static byte[]
    replaceIfNull(ByteVector values, byte replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static char[]
    replaceIfNull(CharVector values, char replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static double[]
    replaceIfNull(DoubleVector values, double replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static float[]
    replaceIfNull(FloatVector values, float replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static int[]
    replaceIfNull(IntVector values, int replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static long[]
    replaceIfNull(LongVector values, long replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static <T> T[]
    replaceIfNull(ObjectVector<T> values, T replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static short[]
    replaceIfNull(ShortVector values, short replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static <T> T[]
    replaceIfNull(T[] values, T replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static <T> T
    replaceIfNull(T value, T replacement)
    Replaces values that are null according to Deephaven convention with a specified value.
    static byte[]
    reverse(byte... values)
    Returns an array with the values reversed.
    static char[]
    reverse(char... values)
    Returns an array with the values reversed.
    static double[]
    reverse(double... values)
    Returns an array with the values reversed.
    static float[]
    reverse(float... values)
    Returns an array with the values reversed.
    static int[]
    reverse(int... values)
    Returns an array with the values reversed.
    static long[]
    reverse(long... values)
    Returns an array with the values reversed.
    static short[]
    reverse(short... values)
    Returns an array with the values reversed.
    static byte[]
    Returns an array with the values reversed.
    static char[]
    Returns an array with the values reversed.
    static double[]
    Returns an array with the values reversed.
    static float[]
    Returns an array with the values reversed.
    static int[]
    Returns an array with the values reversed.
    static long[]
    Returns an array with the values reversed.
    static short[]
    Returns an array with the values reversed.
    static <T> T[]
    Returns an array with the values reversed.
    static <T> T[]
    reverseObj(T... values)
    Returns an array with the values reversed.
    static byte[]
    unbox(Byte... values)
    Unboxes an array of values.
    static char[]
    unbox(Character... values)
    Unboxes an array of values.
    static double[]
    unbox(Double... values)
    Unboxes an array of values.
    static float[]
    unbox(Float... values)
    Unboxes an array of values.
    static int[]
    unbox(Integer... values)
    Unboxes an array of values.
    static long[]
    unbox(Long... values)
    Unboxes an array of values.
    static short[]
    unbox(Short... values)
    Unboxes an array of values.
    static ByteVector
    vec(byte... values)
    Converts a primitive array to a Deephaven vector.
    static CharVector
    vec(char... values)
    Converts a primitive array to a Deephaven vector.
    vec(double... values)
    Converts a primitive array to a Deephaven vector.
    vec(float... values)
    Converts a primitive array to a Deephaven vector.
    static IntVector
    vec(int... values)
    Converts a primitive array to a Deephaven vector.
    static LongVector
    vec(long... values)
    Converts a primitive array to a Deephaven vector.
    vec(short... values)
    Converts a primitive array to a Deephaven vector.
    static <T> ObjectVector<T>
    vecObj(T... values)
    Converts an array to a Deephaven vector.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Basic

      public Basic()
  • Method Details

    • nullValueFor

      public static <T> T nullValueFor(Class<T> clazz)
      Returns the null value in the Deephaven convention that corresponds to type T.
      Parameters:
      clazz - The type.
      Returns:
      The corresponding null value in the Deephaven convention if T is one of the Deephaven types with a distinguished null value. Otherwise, null,
    • isNull

      public static <T> boolean isNull(T value)
      Determines if a value is considered by the Deephaven convention to be null. In the Deephaven convention, every simple type T has a special distinguished value NULL_T which is used to represent the null value for that type. These values are enumerated in the QueryConstants class.
      Parameters:
      value - value.
      Returns:
      true if the value is null according to the Deephaven convention, and false otherwise.
    • replaceIfNull

      public static <T> T replaceIfNull(T value, T replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      value - value.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      value, if value is not null according to Deephaven convention, replacement otherwise.
    • replaceIfNull

      public static <T> T[] replaceIfNull(T[] values, T replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      values - the values.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      array containing value, if value is not null according to Deephaven convention, replacement otherwise.
    • replaceIfNull

      public static <T> T[] replaceIfNull(ObjectVector<T> values, T replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      values - the values.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      array containing value, if value is not null according to Deephaven convention, replacement otherwise.
    • len

      public static <T> long len(T[] values)
      Returns the length of the input.
      Parameters:
      values - values.
      Returns:
      length of the input or the Deephaven null constant for null inputs.
    • len

      public static long len(LongSizedDataStructure values)
      Returns the length of the input.
      Parameters:
      values - values.
      Returns:
      length of the input or the Deephaven null constant for null inputs.
    • countObj

      @SafeVarargs public static <T> long countObj(T... values)
      Counts the number of non-null values.
      Parameters:
      values - values.
      Returns:
      number of non-null values.
    • countObj

      public static <T> long countObj(ObjectVector<T> values)
      Counts the number of non-null values.
      Parameters:
      values - values.
      Returns:
      number of non-null values.
    • lastObj

      @SafeVarargs public static <T> T lastObj(T... values)
      Returns the last value from an array.
      Parameters:
      values - values.
      Returns:
      last value from the array.
    • lastObj

      public static <T> T lastObj(ObjectVector<T> values)
      Returns the last value from an array.
      Parameters:
      values - values.
      Returns:
      last value from the array.
    • firstObj

      @SafeVarargs public static <T> T firstObj(T... values)
      Returns the first value from an array.
      Parameters:
      values - values.
      Returns:
      first value from the array.
    • firstObj

      public static <T> T firstObj(ObjectVector<T> values)
      Returns the first value from an array.
      Parameters:
      values - values.
      Returns:
      first value from the array.
    • nthObj

      @SafeVarargs public static <T> T nthObj(long index, T... values)
      Returns the nth value from an array.
      Parameters:
      index - index of the value to return.
      values - values.
      Returns:
      nth value from the array or null, if the index is outside of the array's index range.
    • nthObj

      public static <T> T nthObj(long index, ObjectVector<T> values)
      Returns the nth value from an array.
      Parameters:
      index - index of the value to return.
      values - values.
      Returns:
      nth value from the array or null, if the index is outside of the array's index range.
    • arrayObj

      public static <T> T[] arrayObj(ObjectVector<T> values)
      Converts a Deephaven vector to an array that may be freely mutated by the caller.
      Parameters:
      values - A Deephaven vector
      Returns:
      The result array, which may be freely mutated by the caller
    • vecObj

      @SafeVarargs public static <T> ObjectVector<T> vecObj(T... values)
      Converts an array to a Deephaven vector.
      Parameters:
      values - primitive array
      Returns:
      Deephaven vector.
    • inRange

      public static <T extends Comparable<? super T>> boolean inRange(T testedValue, T lowInclusiveValue, T highInclusiveValue)
      Checks if a value is within a range.
      Parameters:
      testedValue - tested value.
      lowInclusiveValue - lower inclusive bound of the range.
      highInclusiveValue - upper inclusive bound of the range.
      Returns:
      true if the tested value is within the range, and false if the tested value is not in the range or is null.
    • inObj

      @SafeVarargs public static <T> boolean inObj(T testedValue, T... possibleValues)
      Checks if a value is within a discrete set of possible values.
      Parameters:
      testedValue - tested value.
      possibleValues - possible values.
      Returns:
      true if the tested value is contained in the possible values, and false otherwise.
    • inObj

      public static <T> boolean inObj(T testedValue, ObjectVector<T> possibleValues)
      Checks if a value is within a discrete set of possible values.
      Parameters:
      testedValue - tested value.
      possibleValues - possible values.
      Returns:
      true if the tested value is contained in the possible values, and false otherwise.
    • countDistinctObj

      public static <T extends Comparable<? super T>> long countDistinctObj(ObjectVector<T> values)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      Returns:
      number of distinct non-null values.
    • countDistinctObj

      @SafeVarargs public static <T extends Comparable<? super T>> long countDistinctObj(T... values)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      Returns:
      number of distinct non-null values.
    • countDistinctObj

      public static <T extends Comparable<? super T>> long countDistinctObj(T[] values, boolean countNull)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      countNull - true to count null values, and false to exclude null values.
      Returns:
      number of distinct values.
    • countDistinctObj

      public static <T extends Comparable<? super T>> long countDistinctObj(ObjectVector<T> values, boolean countNull)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      countNull - true to count null values, and false to exclude null values.
      Returns:
      number of distinct values.
    • distinctObj

      @SafeVarargs public static <T extends Comparable<? super T>> T[] distinctObj(T... values)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      Returns:
      unsorted array containing only distinct non-null items from arr.
    • distinctObj

      public static <T extends Comparable<? super T>> T[] distinctObj(ObjectVector<T> values)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      Returns:
      unsorted array containing only distinct non-null items from arr.
    • distinctObj

      public static <T extends Comparable<? super T>> T[] distinctObj(T[] values, boolean includeNull)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      includeNull - true to include null values, and false to exclude null values.
      Returns:
      array containing only distinct items from arr.
    • distinctObj

      public static <T extends Comparable<? super T>> T[] distinctObj(ObjectVector<T> values, boolean includeNull)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      includeNull - true to include null values, and false to exclude null values.
      Returns:
      array containing only distinct items from arr.
    • repeat

      public static <T> T[] repeat(T value, int size)
      Returns an array with a value repeated.
      Parameters:
      value - value.
      size - number of times to repeat the value.
      Returns:
      array of repeated values. If size is less than or equal to zero, an empty array is returned.
    • concat

      @SafeVarargs public static <T> T[] concat(T[]... values)
      Returns the concatenation of multiple arrays into a single array.
      Parameters:
      values - values.
      Returns:
      concatenation of multiple arrays into a single array.
    • concat

      @SafeVarargs public static <T> T[] concat(ObjectVector<T>... values)
      Returns the concatenation of multiple arrays into a single array.
      Parameters:
      values - values.
      Returns:
      concatenation of multiple arrays into a single array.
    • reverseObj

      @SafeVarargs public static <T> T[] reverseObj(T... values)
      Returns an array with the values reversed.
      Parameters:
      values - values.
      Returns:
      array with the values reversed.
    • reverseObj

      public static <T> T[] reverseObj(ObjectVector<T> values)
      Returns an array with the values reversed.
      Parameters:
      values - values.
      Returns:
      array with the values reversed.
    • firstIndexOfObj

      @SafeVarargs public static <T> long firstIndexOfObj(T val, T... values)
      Returns the first index containing the value.
      Parameters:
      values - values.
      val - value to search for.
      Returns:
      first index containing the value or null, if the value is not present.
    • firstIndexOfObj

      public static <T> long firstIndexOfObj(T val, ObjectVector<T> values)
      Returns the first index containing the value.
      Parameters:
      values - values.
      val - value to search for.
      Returns:
      first index containing the value or null, if the value is not present.
    • ifelseObj

      public static <T> T ifelseObj(Boolean condition, T trueCase, T falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      trueCase value if condition is true, falseCase value if condition is false, or null if condition is null.
    • ifelseObj

      public static <T> T[] ifelseObj(ObjectVector<Boolean> condition, ObjectVector<T> trueCase, ObjectVector<T> falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of T whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be the trueCase element if the condition element is true; the falseCase element if the condition element is false; or null if the condition element is null. Returns null if any of the inputs is null.
    • ifelseObj

      public static <T> T[] ifelseObj(Boolean[] condition, T[] trueCase, T[] falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of T whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be the trueCase element if the condition element is true; the falseCase element if the condition element is false; or null if the condition element is null. Returns null if any of the inputs is null.
    • ifelseObj

      public static <T> T[] ifelseObj(ObjectVector<Boolean> condition, T trueCase, T falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of T whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be trueCase if the condition element is true; falseCase if the condition element is false; or null if the condition element is null. Returns null if condition is null.
    • ifelseObj

      public static <T> T[] ifelseObj(Boolean[] condition, T trueCase, T falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of T whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be trueCase if the condition element is true; falseCase if the condition element is false; or null if the condition element is null. Returns null if condition is null.
    • forwardFillObj

      @SafeVarargs public static <T> T[] forwardFillObj(T... values)
      Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists. Otherwise (if no such value exists), replaces those elements with null.
      Parameters:
      values - values.
      Returns:
      A copy of the specified array, with Deephaven null elements replaced as described above. If the specified array is null, returns null.
    • forwardFillObj

      public static <T> T[] forwardFillObj(ObjectVector<T> values)
      Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists. Otherwise (if no such value exists), replaces those elements with null.
      Parameters:
      values - values.
      Returns:
      A copy of the specified array, with Deephaven null elements replaced as described above. If the specified array is null, returns null.
    • isNull

      public static boolean isNull(char value)
      Determines if a value is considered by the Deephaven convention to be null. In the Deephaven convention, every simple type T has a special distinguished value NULL_T which is used to represent the null value for that type. These values are enumerated in the QueryConstants class.
      Parameters:
      value - value.
      Returns:
      true if the value is null according to the Deephaven convention, and false otherwise.
    • unbox

      public static char[] unbox(Character... values)
      Unboxes an array of values.
      Parameters:
      values - values.
      Returns:
      unboxed array of values.
    • replaceIfNull

      public static char replaceIfNull(char value, char replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      value - value.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      value, if value is not null according to Deephaven convention, replacement otherwise.
    • replaceIfNull

      public static char[] replaceIfNull(char[] values, char replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      values - the values.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      array containing value, if value is not null according to Deephaven convention, replacement otherwise.
    • replaceIfNull

      public static char[] replaceIfNull(CharVector values, char replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      values - the values.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      array containing value, if value is not null according to Deephaven convention, replacement otherwise.
    • len

      public static long len(char[] values)
      Returns the length of the input.
      Parameters:
      values - values.
      Returns:
      length of the input or the Deephaven null constant for null inputs.
    • count

      public static long count(char... values)
      Counts the number of non-null values.
      Parameters:
      values - values.
      Returns:
      number of non-null values.
    • count

      public static long count(CharVector values)
      Counts the number of non-null values.
      Parameters:
      values - values.
      Returns:
      number of non-null values.
    • last

      public static char last(CharVector values)
      Returns the last value from an array.
      Parameters:
      values - values.
      Returns:
      last value from the array.
    • last

      public static char last(char... values)
      Returns the last value from an array.
      Parameters:
      values - values.
      Returns:
      last value from the array.
    • first

      public static char first(CharVector values)
      Returns the first value from an array.
      Parameters:
      values - values.
      Returns:
      first value from the array.
    • first

      public static char first(char... values)
      Returns the first value from an array.
      Parameters:
      values - values.
      Returns:
      first value from the array.
    • nth

      public static char nth(long index, CharVector values)
      Returns the nth value from an array.
      Parameters:
      index - index of the value to return.
      values - values.
      Returns:
      nth value from the array or null, if the index is outside of the array's index range.
    • nth

      public static char nth(long index, char... values)
      Returns the nth value from an array.
      Parameters:
      index - index of the value to return.
      values - values.
      Returns:
      nth value from the array or null, if the index is outside of the array's index range.
    • array

      public static char[] array(CharVector values)
      Converts a Deephaven vector to a primitive array that may be freely mutated by the caller.
      Parameters:
      values - Deephaven vector
      Returns:
      primitive array, which may be freely mutated by the caller
    • vec

      public static CharVector vec(char... values)
      Converts a primitive array to a Deephaven vector.
      Parameters:
      values - primitive array
      Returns:
      Deephaven vector.
    • inRange

      public static boolean inRange(char testedValue, char lowInclusiveValue, char highInclusiveValue)
      Checks if a value is within a range.
      Parameters:
      testedValue - tested value.
      lowInclusiveValue - lower inclusive bound of the range.
      highInclusiveValue - upper inclusive bound of the range.
      Returns:
      true if the tested value is within the range, and false if the tested value is not in the range or is null.
    • in

      public static boolean in(char testedValues, char... possibleValues)
      Checks if a value is within a discrete set of possible values.
      Parameters:
      testedValues - tested value.
      possibleValues - possible values.
      Returns:
      true if the tested value is contained in the possible values, and false otherwise.
    • countDistinct

      public static long countDistinct(char... values)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      Returns:
      number of distinct non-null values.
    • countDistinct

      public static long countDistinct(CharVector values)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      Returns:
      number of distinct non-null values.
    • countDistinct

      public static long countDistinct(char[] values, boolean countNull)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      countNull - true to count null values, and false to exclude null values.
      Returns:
      number of distinct values.
    • countDistinct

      public static long countDistinct(CharVector values, boolean countNull)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      countNull - true to count null values, and false to exclude null values.
      Returns:
      number of distinct values.
    • distinct

      public static char[] distinct(char... values)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      Returns:
      unsorted array containing only distinct non-null items from arr.
    • distinct

      public static char[] distinct(CharVector values)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      Returns:
      unsorted array containing only distinct non-null items from arr.
    • distinct

      public static char[] distinct(char[] values, boolean includeNull)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      includeNull - true to include null values, and false to exclude null values.
      Returns:
      array containing only distinct items from arr.
    • distinct

      public static char[] distinct(CharVector values, boolean includeNull)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      includeNull - true to include null values, and false to exclude null values.
      Returns:
      array containing only distinct items from arr.
    • repeat

      public static char[] repeat(char value, int size)
      Returns an array with a value repeated.
      Parameters:
      value - value.
      size - number of times to repeat the value.
      Returns:
      array of repeated values. If size is less than zero, an empty array is returned.
    • enlist

      public static char[] enlist(char... values)
      Returns a list containing its arguments.
      Parameters:
      values - values.
      Returns:
      list containing values.
    • concat

      public static char[] concat(char[]... values)
      Returns the concatenation of multiple arrays into a single array.
      Parameters:
      values - values.
      Returns:
      concatenation of multiple arrays into a single array.
    • concat

      public static char[] concat(CharVector... values)
      Returns the concatenation of multiple arrays into a single array.
      Parameters:
      values - values.
      Returns:
      concatenation of multiple arrays into a single array.
    • reverse

      public static char[] reverse(char... values)
      Returns an array with the values reversed.
      Parameters:
      values - values.
      Returns:
      array with the values reversed.
    • reverse

      public static char[] reverse(CharVector values)
      Returns an array with the values reversed.
      Parameters:
      values - values.
      Returns:
      array with the values reversed.
    • firstIndexOf

      public static long firstIndexOf(char val, char... values)
      Returns the first index containing the value.
      Parameters:
      values - values.
      val - value to search for.
      Returns:
      first index containing the value or null, if the value is not present.
    • firstIndexOf

      public static long firstIndexOf(char val, CharVector values)
      Returns the first index containing the value.
      Parameters:
      values - values.
      val - value to search for.
      Returns:
      first index containing the value or null, if the value is not present.
    • ifelse

      public static char ifelse(Boolean condition, char trueCase, char falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      trueCase value if condition is true, falseCase value if condition is false, or the Deephaven null constant if condition is null.
    • ifelse

      public static char[] ifelse(ObjectVector<Boolean> condition, CharVector trueCase, CharVector falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of char whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be the trueCase element if the condition element is true; the falseCase element if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if any of the inputs is null.
    • ifelse

      public static char[] ifelse(Boolean[] condition, char[] trueCase, char[] falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of char whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be the trueCase element if the condition element is true; the falseCase element if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if any of the inputs is null.
    • ifelse

      public static char[] ifelse(ObjectVector<Boolean> condition, char trueCase, char falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of char whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be trueCase if the condition element is true; falseCase if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if condition is null.
    • ifelse

      public static char[] ifelse(Boolean[] condition, char trueCase, char falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of char whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be trueCase if the condition element is true; falseCase if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if condition is null.
    • forwardFill

      public static char[] forwardFill(char... values)
      Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists. Otherwise (if no such value exists), replaces those elements with Deephaven null.
      Parameters:
      values - values.
      Returns:
      A copy of the specified array, with Deephaven null elements replaced as described above. If the specified array is null, returns null.
    • forwardFill

      public static char[] forwardFill(CharVector values)
      Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists. Otherwise (if no such value exists), replaces those elements with Deephaven null.
      Parameters:
      values - values.
      Returns:
      A copy of the specified array, with Deephaven null elements replaced as described above. If the specified array is null, returns null.
    • isNull

      public static boolean isNull(byte value)
      Determines if a value is considered by the Deephaven convention to be null. In the Deephaven convention, every simple type T has a special distinguished value NULL_T which is used to represent the null value for that type. These values are enumerated in the QueryConstants class.
      Parameters:
      value - value.
      Returns:
      true if the value is null according to the Deephaven convention, and false otherwise.
    • unbox

      public static byte[] unbox(Byte... values)
      Unboxes an array of values.
      Parameters:
      values - values.
      Returns:
      unboxed array of values.
    • replaceIfNull

      public static byte replaceIfNull(byte value, byte replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      value - value.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      value, if value is not null according to Deephaven convention, replacement otherwise.
    • replaceIfNull

      public static byte[] replaceIfNull(byte[] values, byte replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      values - the values.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      array containing value, if value is not null according to Deephaven convention, replacement otherwise.
    • replaceIfNull

      public static byte[] replaceIfNull(ByteVector values, byte replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      values - the values.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      array containing value, if value is not null according to Deephaven convention, replacement otherwise.
    • len

      public static long len(byte[] values)
      Returns the length of the input.
      Parameters:
      values - values.
      Returns:
      length of the input or the Deephaven null constant for null inputs.
    • count

      public static long count(byte... values)
      Counts the number of non-null values.
      Parameters:
      values - values.
      Returns:
      number of non-null values.
    • count

      public static long count(ByteVector values)
      Counts the number of non-null values.
      Parameters:
      values - values.
      Returns:
      number of non-null values.
    • last

      public static byte last(ByteVector values)
      Returns the last value from an array.
      Parameters:
      values - values.
      Returns:
      last value from the array.
    • last

      public static byte last(byte... values)
      Returns the last value from an array.
      Parameters:
      values - values.
      Returns:
      last value from the array.
    • first

      public static byte first(ByteVector values)
      Returns the first value from an array.
      Parameters:
      values - values.
      Returns:
      first value from the array.
    • first

      public static byte first(byte... values)
      Returns the first value from an array.
      Parameters:
      values - values.
      Returns:
      first value from the array.
    • nth

      public static byte nth(long index, ByteVector values)
      Returns the nth value from an array.
      Parameters:
      index - index of the value to return.
      values - values.
      Returns:
      nth value from the array or null, if the index is outside of the array's index range.
    • nth

      public static byte nth(long index, byte... values)
      Returns the nth value from an array.
      Parameters:
      index - index of the value to return.
      values - values.
      Returns:
      nth value from the array or null, if the index is outside of the array's index range.
    • array

      public static byte[] array(ByteVector values)
      Converts a Deephaven vector to a primitive array that may be freely mutated by the caller.
      Parameters:
      values - Deephaven vector
      Returns:
      primitive array, which may be freely mutated by the caller
    • vec

      public static ByteVector vec(byte... values)
      Converts a primitive array to a Deephaven vector.
      Parameters:
      values - primitive array
      Returns:
      Deephaven vector.
    • inRange

      public static boolean inRange(byte testedValue, byte lowInclusiveValue, byte highInclusiveValue)
      Checks if a value is within a range.
      Parameters:
      testedValue - tested value.
      lowInclusiveValue - lower inclusive bound of the range.
      highInclusiveValue - upper inclusive bound of the range.
      Returns:
      true if the tested value is within the range, and false if the tested value is not in the range or is null.
    • in

      public static boolean in(byte testedValues, byte... possibleValues)
      Checks if a value is within a discrete set of possible values.
      Parameters:
      testedValues - tested value.
      possibleValues - possible values.
      Returns:
      true if the tested value is contained in the possible values, and false otherwise.
    • countDistinct

      public static long countDistinct(byte... values)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      Returns:
      number of distinct non-null values.
    • countDistinct

      public static long countDistinct(ByteVector values)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      Returns:
      number of distinct non-null values.
    • countDistinct

      public static long countDistinct(byte[] values, boolean countNull)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      countNull - true to count null values, and false to exclude null values.
      Returns:
      number of distinct values.
    • countDistinct

      public static long countDistinct(ByteVector values, boolean countNull)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      countNull - true to count null values, and false to exclude null values.
      Returns:
      number of distinct values.
    • distinct

      public static byte[] distinct(byte... values)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      Returns:
      unsorted array containing only distinct non-null items from arr.
    • distinct

      public static byte[] distinct(ByteVector values)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      Returns:
      unsorted array containing only distinct non-null items from arr.
    • distinct

      public static byte[] distinct(byte[] values, boolean includeNull)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      includeNull - true to include null values, and false to exclude null values.
      Returns:
      array containing only distinct items from arr.
    • distinct

      public static byte[] distinct(ByteVector values, boolean includeNull)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      includeNull - true to include null values, and false to exclude null values.
      Returns:
      array containing only distinct items from arr.
    • repeat

      public static byte[] repeat(byte value, int size)
      Returns an array with a value repeated.
      Parameters:
      value - value.
      size - number of times to repeat the value.
      Returns:
      array of repeated values. If size is less than zero, an empty array is returned.
    • enlist

      public static byte[] enlist(byte... values)
      Returns a list containing its arguments.
      Parameters:
      values - values.
      Returns:
      list containing values.
    • concat

      public static byte[] concat(byte[]... values)
      Returns the concatenation of multiple arrays into a single array.
      Parameters:
      values - values.
      Returns:
      concatenation of multiple arrays into a single array.
    • concat

      public static byte[] concat(ByteVector... values)
      Returns the concatenation of multiple arrays into a single array.
      Parameters:
      values - values.
      Returns:
      concatenation of multiple arrays into a single array.
    • reverse

      public static byte[] reverse(byte... values)
      Returns an array with the values reversed.
      Parameters:
      values - values.
      Returns:
      array with the values reversed.
    • reverse

      public static byte[] reverse(ByteVector values)
      Returns an array with the values reversed.
      Parameters:
      values - values.
      Returns:
      array with the values reversed.
    • firstIndexOf

      public static long firstIndexOf(byte val, byte... values)
      Returns the first index containing the value.
      Parameters:
      values - values.
      val - value to search for.
      Returns:
      first index containing the value or null, if the value is not present.
    • firstIndexOf

      public static long firstIndexOf(byte val, ByteVector values)
      Returns the first index containing the value.
      Parameters:
      values - values.
      val - value to search for.
      Returns:
      first index containing the value or null, if the value is not present.
    • ifelse

      public static byte ifelse(Boolean condition, byte trueCase, byte falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      trueCase value if condition is true, falseCase value if condition is false, or the Deephaven null constant if condition is null.
    • ifelse

      public static byte[] ifelse(ObjectVector<Boolean> condition, ByteVector trueCase, ByteVector falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of byte whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be the trueCase element if the condition element is true; the falseCase element if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if any of the inputs is null.
    • ifelse

      public static byte[] ifelse(Boolean[] condition, byte[] trueCase, byte[] falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of byte whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be the trueCase element if the condition element is true; the falseCase element if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if any of the inputs is null.
    • ifelse

      public static byte[] ifelse(ObjectVector<Boolean> condition, byte trueCase, byte falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of byte whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be trueCase if the condition element is true; falseCase if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if condition is null.
    • ifelse

      public static byte[] ifelse(Boolean[] condition, byte trueCase, byte falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of byte whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be trueCase if the condition element is true; falseCase if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if condition is null.
    • forwardFill

      public static byte[] forwardFill(byte... values)
      Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists. Otherwise (if no such value exists), replaces those elements with Deephaven null.
      Parameters:
      values - values.
      Returns:
      A copy of the specified array, with Deephaven null elements replaced as described above. If the specified array is null, returns null.
    • forwardFill

      public static byte[] forwardFill(ByteVector values)
      Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists. Otherwise (if no such value exists), replaces those elements with Deephaven null.
      Parameters:
      values - values.
      Returns:
      A copy of the specified array, with Deephaven null elements replaced as described above. If the specified array is null, returns null.
    • isNull

      public static boolean isNull(short value)
      Determines if a value is considered by the Deephaven convention to be null. In the Deephaven convention, every simple type T has a special distinguished value NULL_T which is used to represent the null value for that type. These values are enumerated in the QueryConstants class.
      Parameters:
      value - value.
      Returns:
      true if the value is null according to the Deephaven convention, and false otherwise.
    • unbox

      public static short[] unbox(Short... values)
      Unboxes an array of values.
      Parameters:
      values - values.
      Returns:
      unboxed array of values.
    • replaceIfNull

      public static short replaceIfNull(short value, short replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      value - value.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      value, if value is not null according to Deephaven convention, replacement otherwise.
    • replaceIfNull

      public static short[] replaceIfNull(short[] values, short replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      values - the values.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      array containing value, if value is not null according to Deephaven convention, replacement otherwise.
    • replaceIfNull

      public static short[] replaceIfNull(ShortVector values, short replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      values - the values.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      array containing value, if value is not null according to Deephaven convention, replacement otherwise.
    • len

      public static long len(short[] values)
      Returns the length of the input.
      Parameters:
      values - values.
      Returns:
      length of the input or the Deephaven null constant for null inputs.
    • count

      public static long count(short... values)
      Counts the number of non-null values.
      Parameters:
      values - values.
      Returns:
      number of non-null values.
    • count

      public static long count(ShortVector values)
      Counts the number of non-null values.
      Parameters:
      values - values.
      Returns:
      number of non-null values.
    • last

      public static short last(ShortVector values)
      Returns the last value from an array.
      Parameters:
      values - values.
      Returns:
      last value from the array.
    • last

      public static short last(short... values)
      Returns the last value from an array.
      Parameters:
      values - values.
      Returns:
      last value from the array.
    • first

      public static short first(ShortVector values)
      Returns the first value from an array.
      Parameters:
      values - values.
      Returns:
      first value from the array.
    • first

      public static short first(short... values)
      Returns the first value from an array.
      Parameters:
      values - values.
      Returns:
      first value from the array.
    • nth

      public static short nth(long index, ShortVector values)
      Returns the nth value from an array.
      Parameters:
      index - index of the value to return.
      values - values.
      Returns:
      nth value from the array or null, if the index is outside of the array's index range.
    • nth

      public static short nth(long index, short... values)
      Returns the nth value from an array.
      Parameters:
      index - index of the value to return.
      values - values.
      Returns:
      nth value from the array or null, if the index is outside of the array's index range.
    • array

      public static short[] array(ShortVector values)
      Converts a Deephaven vector to a primitive array that may be freely mutated by the caller.
      Parameters:
      values - Deephaven vector
      Returns:
      primitive array, which may be freely mutated by the caller
    • vec

      public static ShortVector vec(short... values)
      Converts a primitive array to a Deephaven vector.
      Parameters:
      values - primitive array
      Returns:
      Deephaven vector.
    • inRange

      public static boolean inRange(short testedValue, short lowInclusiveValue, short highInclusiveValue)
      Checks if a value is within a range.
      Parameters:
      testedValue - tested value.
      lowInclusiveValue - lower inclusive bound of the range.
      highInclusiveValue - upper inclusive bound of the range.
      Returns:
      true if the tested value is within the range, and false if the tested value is not in the range or is null.
    • in

      public static boolean in(short testedValues, short... possibleValues)
      Checks if a value is within a discrete set of possible values.
      Parameters:
      testedValues - tested value.
      possibleValues - possible values.
      Returns:
      true if the tested value is contained in the possible values, and false otherwise.
    • countDistinct

      public static long countDistinct(short... values)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      Returns:
      number of distinct non-null values.
    • countDistinct

      public static long countDistinct(ShortVector values)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      Returns:
      number of distinct non-null values.
    • countDistinct

      public static long countDistinct(short[] values, boolean countNull)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      countNull - true to count null values, and false to exclude null values.
      Returns:
      number of distinct values.
    • countDistinct

      public static long countDistinct(ShortVector values, boolean countNull)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      countNull - true to count null values, and false to exclude null values.
      Returns:
      number of distinct values.
    • distinct

      public static short[] distinct(short... values)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      Returns:
      unsorted array containing only distinct non-null items from arr.
    • distinct

      public static short[] distinct(ShortVector values)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      Returns:
      unsorted array containing only distinct non-null items from arr.
    • distinct

      public static short[] distinct(short[] values, boolean includeNull)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      includeNull - true to include null values, and false to exclude null values.
      Returns:
      array containing only distinct items from arr.
    • distinct

      public static short[] distinct(ShortVector values, boolean includeNull)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      includeNull - true to include null values, and false to exclude null values.
      Returns:
      array containing only distinct items from arr.
    • repeat

      public static short[] repeat(short value, int size)
      Returns an array with a value repeated.
      Parameters:
      value - value.
      size - number of times to repeat the value.
      Returns:
      array of repeated values. If size is less than zero, an empty array is returned.
    • enlist

      public static short[] enlist(short... values)
      Returns a list containing its arguments.
      Parameters:
      values - values.
      Returns:
      list containing values.
    • concat

      public static short[] concat(short[]... values)
      Returns the concatenation of multiple arrays into a single array.
      Parameters:
      values - values.
      Returns:
      concatenation of multiple arrays into a single array.
    • concat

      public static short[] concat(ShortVector... values)
      Returns the concatenation of multiple arrays into a single array.
      Parameters:
      values - values.
      Returns:
      concatenation of multiple arrays into a single array.
    • reverse

      public static short[] reverse(short... values)
      Returns an array with the values reversed.
      Parameters:
      values - values.
      Returns:
      array with the values reversed.
    • reverse

      public static short[] reverse(ShortVector values)
      Returns an array with the values reversed.
      Parameters:
      values - values.
      Returns:
      array with the values reversed.
    • firstIndexOf

      public static long firstIndexOf(short val, short... values)
      Returns the first index containing the value.
      Parameters:
      values - values.
      val - value to search for.
      Returns:
      first index containing the value or null, if the value is not present.
    • firstIndexOf

      public static long firstIndexOf(short val, ShortVector values)
      Returns the first index containing the value.
      Parameters:
      values - values.
      val - value to search for.
      Returns:
      first index containing the value or null, if the value is not present.
    • ifelse

      public static short ifelse(Boolean condition, short trueCase, short falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      trueCase value if condition is true, falseCase value if condition is false, or the Deephaven null constant if condition is null.
    • ifelse

      public static short[] ifelse(ObjectVector<Boolean> condition, ShortVector trueCase, ShortVector falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of short whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be the trueCase element if the condition element is true; the falseCase element if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if any of the inputs is null.
    • ifelse

      public static short[] ifelse(Boolean[] condition, short[] trueCase, short[] falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of short whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be the trueCase element if the condition element is true; the falseCase element if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if any of the inputs is null.
    • ifelse

      public static short[] ifelse(ObjectVector<Boolean> condition, short trueCase, short falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of short whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be trueCase if the condition element is true; falseCase if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if condition is null.
    • ifelse

      public static short[] ifelse(Boolean[] condition, short trueCase, short falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of short whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be trueCase if the condition element is true; falseCase if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if condition is null.
    • forwardFill

      public static short[] forwardFill(short... values)
      Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists. Otherwise (if no such value exists), replaces those elements with Deephaven null.
      Parameters:
      values - values.
      Returns:
      A copy of the specified array, with Deephaven null elements replaced as described above. If the specified array is null, returns null.
    • forwardFill

      public static short[] forwardFill(ShortVector values)
      Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists. Otherwise (if no such value exists), replaces those elements with Deephaven null.
      Parameters:
      values - values.
      Returns:
      A copy of the specified array, with Deephaven null elements replaced as described above. If the specified array is null, returns null.
    • isNull

      public static boolean isNull(int value)
      Determines if a value is considered by the Deephaven convention to be null. In the Deephaven convention, every simple type T has a special distinguished value NULL_T which is used to represent the null value for that type. These values are enumerated in the QueryConstants class.
      Parameters:
      value - value.
      Returns:
      true if the value is null according to the Deephaven convention, and false otherwise.
    • unbox

      public static int[] unbox(Integer... values)
      Unboxes an array of values.
      Parameters:
      values - values.
      Returns:
      unboxed array of values.
    • replaceIfNull

      public static int replaceIfNull(int value, int replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      value - value.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      value, if value is not null according to Deephaven convention, replacement otherwise.
    • replaceIfNull

      public static int[] replaceIfNull(int[] values, int replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      values - the values.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      array containing value, if value is not null according to Deephaven convention, replacement otherwise.
    • replaceIfNull

      public static int[] replaceIfNull(IntVector values, int replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      values - the values.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      array containing value, if value is not null according to Deephaven convention, replacement otherwise.
    • len

      public static long len(int[] values)
      Returns the length of the input.
      Parameters:
      values - values.
      Returns:
      length of the input or the Deephaven null constant for null inputs.
    • count

      public static long count(int... values)
      Counts the number of non-null values.
      Parameters:
      values - values.
      Returns:
      number of non-null values.
    • count

      public static long count(IntVector values)
      Counts the number of non-null values.
      Parameters:
      values - values.
      Returns:
      number of non-null values.
    • last

      public static int last(IntVector values)
      Returns the last value from an array.
      Parameters:
      values - values.
      Returns:
      last value from the array.
    • last

      public static int last(int... values)
      Returns the last value from an array.
      Parameters:
      values - values.
      Returns:
      last value from the array.
    • first

      public static int first(IntVector values)
      Returns the first value from an array.
      Parameters:
      values - values.
      Returns:
      first value from the array.
    • first

      public static int first(int... values)
      Returns the first value from an array.
      Parameters:
      values - values.
      Returns:
      first value from the array.
    • nth

      public static int nth(long index, IntVector values)
      Returns the nth value from an array.
      Parameters:
      index - index of the value to return.
      values - values.
      Returns:
      nth value from the array or null, if the index is outside of the array's index range.
    • nth

      public static int nth(long index, int... values)
      Returns the nth value from an array.
      Parameters:
      index - index of the value to return.
      values - values.
      Returns:
      nth value from the array or null, if the index is outside of the array's index range.
    • array

      public static int[] array(IntVector values)
      Converts a Deephaven vector to a primitive array that may be freely mutated by the caller.
      Parameters:
      values - Deephaven vector
      Returns:
      primitive array, which may be freely mutated by the caller
    • vec

      public static IntVector vec(int... values)
      Converts a primitive array to a Deephaven vector.
      Parameters:
      values - primitive array
      Returns:
      Deephaven vector.
    • inRange

      public static boolean inRange(int testedValue, int lowInclusiveValue, int highInclusiveValue)
      Checks if a value is within a range.
      Parameters:
      testedValue - tested value.
      lowInclusiveValue - lower inclusive bound of the range.
      highInclusiveValue - upper inclusive bound of the range.
      Returns:
      true if the tested value is within the range, and false if the tested value is not in the range or is null.
    • in

      public static boolean in(int testedValues, int... possibleValues)
      Checks if a value is within a discrete set of possible values.
      Parameters:
      testedValues - tested value.
      possibleValues - possible values.
      Returns:
      true if the tested value is contained in the possible values, and false otherwise.
    • countDistinct

      public static long countDistinct(int... values)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      Returns:
      number of distinct non-null values.
    • countDistinct

      public static long countDistinct(IntVector values)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      Returns:
      number of distinct non-null values.
    • countDistinct

      public static long countDistinct(int[] values, boolean countNull)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      countNull - true to count null values, and false to exclude null values.
      Returns:
      number of distinct values.
    • countDistinct

      public static long countDistinct(IntVector values, boolean countNull)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      countNull - true to count null values, and false to exclude null values.
      Returns:
      number of distinct values.
    • distinct

      public static int[] distinct(int... values)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      Returns:
      unsorted array containing only distinct non-null items from arr.
    • distinct

      public static int[] distinct(IntVector values)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      Returns:
      unsorted array containing only distinct non-null items from arr.
    • distinct

      public static int[] distinct(int[] values, boolean includeNull)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      includeNull - true to include null values, and false to exclude null values.
      Returns:
      array containing only distinct items from arr.
    • distinct

      public static int[] distinct(IntVector values, boolean includeNull)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      includeNull - true to include null values, and false to exclude null values.
      Returns:
      array containing only distinct items from arr.
    • repeat

      public static int[] repeat(int value, int size)
      Returns an array with a value repeated.
      Parameters:
      value - value.
      size - number of times to repeat the value.
      Returns:
      array of repeated values. If size is less than zero, an empty array is returned.
    • enlist

      public static int[] enlist(int... values)
      Returns a list containing its arguments.
      Parameters:
      values - values.
      Returns:
      list containing values.
    • concat

      public static int[] concat(int[]... values)
      Returns the concatenation of multiple arrays into a single array.
      Parameters:
      values - values.
      Returns:
      concatenation of multiple arrays into a single array.
    • concat

      public static int[] concat(IntVector... values)
      Returns the concatenation of multiple arrays into a single array.
      Parameters:
      values - values.
      Returns:
      concatenation of multiple arrays into a single array.
    • reverse

      public static int[] reverse(int... values)
      Returns an array with the values reversed.
      Parameters:
      values - values.
      Returns:
      array with the values reversed.
    • reverse

      public static int[] reverse(IntVector values)
      Returns an array with the values reversed.
      Parameters:
      values - values.
      Returns:
      array with the values reversed.
    • firstIndexOf

      public static long firstIndexOf(int val, int... values)
      Returns the first index containing the value.
      Parameters:
      values - values.
      val - value to search for.
      Returns:
      first index containing the value or null, if the value is not present.
    • firstIndexOf

      public static long firstIndexOf(int val, IntVector values)
      Returns the first index containing the value.
      Parameters:
      values - values.
      val - value to search for.
      Returns:
      first index containing the value or null, if the value is not present.
    • ifelse

      public static int ifelse(Boolean condition, int trueCase, int falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      trueCase value if condition is true, falseCase value if condition is false, or the Deephaven null constant if condition is null.
    • ifelse

      public static int[] ifelse(ObjectVector<Boolean> condition, IntVector trueCase, IntVector falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of int whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be the trueCase element if the condition element is true; the falseCase element if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if any of the inputs is null.
    • ifelse

      public static int[] ifelse(Boolean[] condition, int[] trueCase, int[] falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of int whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be the trueCase element if the condition element is true; the falseCase element if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if any of the inputs is null.
    • ifelse

      public static int[] ifelse(ObjectVector<Boolean> condition, int trueCase, int falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of int whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be trueCase if the condition element is true; falseCase if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if condition is null.
    • ifelse

      public static int[] ifelse(Boolean[] condition, int trueCase, int falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of int whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be trueCase if the condition element is true; falseCase if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if condition is null.
    • forwardFill

      public static int[] forwardFill(int... values)
      Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists. Otherwise (if no such value exists), replaces those elements with Deephaven null.
      Parameters:
      values - values.
      Returns:
      A copy of the specified array, with Deephaven null elements replaced as described above. If the specified array is null, returns null.
    • forwardFill

      public static int[] forwardFill(IntVector values)
      Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists. Otherwise (if no such value exists), replaces those elements with Deephaven null.
      Parameters:
      values - values.
      Returns:
      A copy of the specified array, with Deephaven null elements replaced as described above. If the specified array is null, returns null.
    • isNull

      public static boolean isNull(long value)
      Determines if a value is considered by the Deephaven convention to be null. In the Deephaven convention, every simple type T has a special distinguished value NULL_T which is used to represent the null value for that type. These values are enumerated in the QueryConstants class.
      Parameters:
      value - value.
      Returns:
      true if the value is null according to the Deephaven convention, and false otherwise.
    • unbox

      public static long[] unbox(Long... values)
      Unboxes an array of values.
      Parameters:
      values - values.
      Returns:
      unboxed array of values.
    • replaceIfNull

      public static long replaceIfNull(long value, long replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      value - value.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      value, if value is not null according to Deephaven convention, replacement otherwise.
    • replaceIfNull

      public static long[] replaceIfNull(long[] values, long replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      values - the values.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      array containing value, if value is not null according to Deephaven convention, replacement otherwise.
    • replaceIfNull

      public static long[] replaceIfNull(LongVector values, long replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      values - the values.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      array containing value, if value is not null according to Deephaven convention, replacement otherwise.
    • len

      public static long len(long[] values)
      Returns the length of the input.
      Parameters:
      values - values.
      Returns:
      length of the input or the Deephaven null constant for null inputs.
    • count

      public static long count(long... values)
      Counts the number of non-null values.
      Parameters:
      values - values.
      Returns:
      number of non-null values.
    • count

      public static long count(LongVector values)
      Counts the number of non-null values.
      Parameters:
      values - values.
      Returns:
      number of non-null values.
    • last

      public static long last(LongVector values)
      Returns the last value from an array.
      Parameters:
      values - values.
      Returns:
      last value from the array.
    • last

      public static long last(long... values)
      Returns the last value from an array.
      Parameters:
      values - values.
      Returns:
      last value from the array.
    • first

      public static long first(LongVector values)
      Returns the first value from an array.
      Parameters:
      values - values.
      Returns:
      first value from the array.
    • first

      public static long first(long... values)
      Returns the first value from an array.
      Parameters:
      values - values.
      Returns:
      first value from the array.
    • nth

      public static long nth(long index, LongVector values)
      Returns the nth value from an array.
      Parameters:
      index - index of the value to return.
      values - values.
      Returns:
      nth value from the array or null, if the index is outside of the array's index range.
    • nth

      public static long nth(long index, long... values)
      Returns the nth value from an array.
      Parameters:
      index - index of the value to return.
      values - values.
      Returns:
      nth value from the array or null, if the index is outside of the array's index range.
    • array

      public static long[] array(LongVector values)
      Converts a Deephaven vector to a primitive array that may be freely mutated by the caller.
      Parameters:
      values - Deephaven vector
      Returns:
      primitive array, which may be freely mutated by the caller
    • vec

      public static LongVector vec(long... values)
      Converts a primitive array to a Deephaven vector.
      Parameters:
      values - primitive array
      Returns:
      Deephaven vector.
    • inRange

      public static boolean inRange(long testedValue, long lowInclusiveValue, long highInclusiveValue)
      Checks if a value is within a range.
      Parameters:
      testedValue - tested value.
      lowInclusiveValue - lower inclusive bound of the range.
      highInclusiveValue - upper inclusive bound of the range.
      Returns:
      true if the tested value is within the range, and false if the tested value is not in the range or is null.
    • in

      public static boolean in(long testedValues, long... possibleValues)
      Checks if a value is within a discrete set of possible values.
      Parameters:
      testedValues - tested value.
      possibleValues - possible values.
      Returns:
      true if the tested value is contained in the possible values, and false otherwise.
    • countDistinct

      public static long countDistinct(long... values)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      Returns:
      number of distinct non-null values.
    • countDistinct

      public static long countDistinct(LongVector values)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      Returns:
      number of distinct non-null values.
    • countDistinct

      public static long countDistinct(long[] values, boolean countNull)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      countNull - true to count null values, and false to exclude null values.
      Returns:
      number of distinct values.
    • countDistinct

      public static long countDistinct(LongVector values, boolean countNull)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      countNull - true to count null values, and false to exclude null values.
      Returns:
      number of distinct values.
    • distinct

      public static long[] distinct(long... values)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      Returns:
      unsorted array containing only distinct non-null items from arr.
    • distinct

      public static long[] distinct(LongVector values)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      Returns:
      unsorted array containing only distinct non-null items from arr.
    • distinct

      public static long[] distinct(long[] values, boolean includeNull)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      includeNull - true to include null values, and false to exclude null values.
      Returns:
      array containing only distinct items from arr.
    • distinct

      public static long[] distinct(LongVector values, boolean includeNull)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      includeNull - true to include null values, and false to exclude null values.
      Returns:
      array containing only distinct items from arr.
    • repeat

      public static long[] repeat(long value, int size)
      Returns an array with a value repeated.
      Parameters:
      value - value.
      size - number of times to repeat the value.
      Returns:
      array of repeated values. If size is less than zero, an empty array is returned.
    • enlist

      public static long[] enlist(long... values)
      Returns a list containing its arguments.
      Parameters:
      values - values.
      Returns:
      list containing values.
    • concat

      public static long[] concat(long[]... values)
      Returns the concatenation of multiple arrays into a single array.
      Parameters:
      values - values.
      Returns:
      concatenation of multiple arrays into a single array.
    • concat

      public static long[] concat(LongVector... values)
      Returns the concatenation of multiple arrays into a single array.
      Parameters:
      values - values.
      Returns:
      concatenation of multiple arrays into a single array.
    • reverse

      public static long[] reverse(long... values)
      Returns an array with the values reversed.
      Parameters:
      values - values.
      Returns:
      array with the values reversed.
    • reverse

      public static long[] reverse(LongVector values)
      Returns an array with the values reversed.
      Parameters:
      values - values.
      Returns:
      array with the values reversed.
    • firstIndexOf

      public static long firstIndexOf(long val, long... values)
      Returns the first index containing the value.
      Parameters:
      values - values.
      val - value to search for.
      Returns:
      first index containing the value or null, if the value is not present.
    • firstIndexOf

      public static long firstIndexOf(long val, LongVector values)
      Returns the first index containing the value.
      Parameters:
      values - values.
      val - value to search for.
      Returns:
      first index containing the value or null, if the value is not present.
    • ifelse

      public static long ifelse(Boolean condition, long trueCase, long falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      trueCase value if condition is true, falseCase value if condition is false, or the Deephaven null constant if condition is null.
    • ifelse

      public static long[] ifelse(ObjectVector<Boolean> condition, LongVector trueCase, LongVector falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of long whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be the trueCase element if the condition element is true; the falseCase element if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if any of the inputs is null.
    • ifelse

      public static long[] ifelse(Boolean[] condition, long[] trueCase, long[] falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of long whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be the trueCase element if the condition element is true; the falseCase element if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if any of the inputs is null.
    • ifelse

      public static long[] ifelse(ObjectVector<Boolean> condition, long trueCase, long falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of long whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be trueCase if the condition element is true; falseCase if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if condition is null.
    • ifelse

      public static long[] ifelse(Boolean[] condition, long trueCase, long falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of long whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be trueCase if the condition element is true; falseCase if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if condition is null.
    • forwardFill

      public static long[] forwardFill(long... values)
      Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists. Otherwise (if no such value exists), replaces those elements with Deephaven null.
      Parameters:
      values - values.
      Returns:
      A copy of the specified array, with Deephaven null elements replaced as described above. If the specified array is null, returns null.
    • forwardFill

      public static long[] forwardFill(LongVector values)
      Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists. Otherwise (if no such value exists), replaces those elements with Deephaven null.
      Parameters:
      values - values.
      Returns:
      A copy of the specified array, with Deephaven null elements replaced as described above. If the specified array is null, returns null.
    • isNull

      public static boolean isNull(float value)
      Determines if a value is considered by the Deephaven convention to be null. In the Deephaven convention, every simple type T has a special distinguished value NULL_T which is used to represent the null value for that type. These values are enumerated in the QueryConstants class.
      Parameters:
      value - value.
      Returns:
      true if the value is null according to the Deephaven convention, and false otherwise.
    • unbox

      public static float[] unbox(Float... values)
      Unboxes an array of values.
      Parameters:
      values - values.
      Returns:
      unboxed array of values.
    • replaceIfNull

      public static float replaceIfNull(float value, float replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      value - value.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      value, if value is not null according to Deephaven convention, replacement otherwise.
    • replaceIfNull

      public static float[] replaceIfNull(float[] values, float replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      values - the values.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      array containing value, if value is not null according to Deephaven convention, replacement otherwise.
    • replaceIfNull

      public static float[] replaceIfNull(FloatVector values, float replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      values - the values.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      array containing value, if value is not null according to Deephaven convention, replacement otherwise.
    • len

      public static long len(float[] values)
      Returns the length of the input.
      Parameters:
      values - values.
      Returns:
      length of the input or the Deephaven null constant for null inputs.
    • count

      public static long count(float... values)
      Counts the number of non-null values.
      Parameters:
      values - values.
      Returns:
      number of non-null values.
    • count

      public static long count(FloatVector values)
      Counts the number of non-null values.
      Parameters:
      values - values.
      Returns:
      number of non-null values.
    • last

      public static float last(FloatVector values)
      Returns the last value from an array.
      Parameters:
      values - values.
      Returns:
      last value from the array.
    • last

      public static float last(float... values)
      Returns the last value from an array.
      Parameters:
      values - values.
      Returns:
      last value from the array.
    • first

      public static float first(FloatVector values)
      Returns the first value from an array.
      Parameters:
      values - values.
      Returns:
      first value from the array.
    • first

      public static float first(float... values)
      Returns the first value from an array.
      Parameters:
      values - values.
      Returns:
      first value from the array.
    • nth

      public static float nth(long index, FloatVector values)
      Returns the nth value from an array.
      Parameters:
      index - index of the value to return.
      values - values.
      Returns:
      nth value from the array or null, if the index is outside of the array's index range.
    • nth

      public static float nth(long index, float... values)
      Returns the nth value from an array.
      Parameters:
      index - index of the value to return.
      values - values.
      Returns:
      nth value from the array or null, if the index is outside of the array's index range.
    • array

      public static float[] array(FloatVector values)
      Converts a Deephaven vector to a primitive array that may be freely mutated by the caller.
      Parameters:
      values - Deephaven vector
      Returns:
      primitive array, which may be freely mutated by the caller
    • vec

      public static FloatVector vec(float... values)
      Converts a primitive array to a Deephaven vector.
      Parameters:
      values - primitive array
      Returns:
      Deephaven vector.
    • inRange

      public static boolean inRange(float testedValue, float lowInclusiveValue, float highInclusiveValue)
      Checks if a value is within a range.
      Parameters:
      testedValue - tested value.
      lowInclusiveValue - lower inclusive bound of the range.
      highInclusiveValue - upper inclusive bound of the range.
      Returns:
      true if the tested value is within the range, and false if the tested value is not in the range or is null.
    • in

      public static boolean in(float testedValues, float... possibleValues)
      Checks if a value is within a discrete set of possible values.
      Parameters:
      testedValues - tested value.
      possibleValues - possible values.
      Returns:
      true if the tested value is contained in the possible values, and false otherwise.
    • countDistinct

      public static long countDistinct(float... values)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      Returns:
      number of distinct non-null values.
    • countDistinct

      public static long countDistinct(FloatVector values)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      Returns:
      number of distinct non-null values.
    • countDistinct

      public static long countDistinct(float[] values, boolean countNull)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      countNull - true to count null values, and false to exclude null values.
      Returns:
      number of distinct values.
    • countDistinct

      public static long countDistinct(FloatVector values, boolean countNull)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      countNull - true to count null values, and false to exclude null values.
      Returns:
      number of distinct values.
    • distinct

      public static float[] distinct(float... values)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      Returns:
      unsorted array containing only distinct non-null items from arr.
    • distinct

      public static float[] distinct(FloatVector values)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      Returns:
      unsorted array containing only distinct non-null items from arr.
    • distinct

      public static float[] distinct(float[] values, boolean includeNull)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      includeNull - true to include null values, and false to exclude null values.
      Returns:
      array containing only distinct items from arr.
    • distinct

      public static float[] distinct(FloatVector values, boolean includeNull)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      includeNull - true to include null values, and false to exclude null values.
      Returns:
      array containing only distinct items from arr.
    • repeat

      public static float[] repeat(float value, int size)
      Returns an array with a value repeated.
      Parameters:
      value - value.
      size - number of times to repeat the value.
      Returns:
      array of repeated values. If size is less than zero, an empty array is returned.
    • enlist

      public static float[] enlist(float... values)
      Returns a list containing its arguments.
      Parameters:
      values - values.
      Returns:
      list containing values.
    • concat

      public static float[] concat(float[]... values)
      Returns the concatenation of multiple arrays into a single array.
      Parameters:
      values - values.
      Returns:
      concatenation of multiple arrays into a single array.
    • concat

      public static float[] concat(FloatVector... values)
      Returns the concatenation of multiple arrays into a single array.
      Parameters:
      values - values.
      Returns:
      concatenation of multiple arrays into a single array.
    • reverse

      public static float[] reverse(float... values)
      Returns an array with the values reversed.
      Parameters:
      values - values.
      Returns:
      array with the values reversed.
    • reverse

      public static float[] reverse(FloatVector values)
      Returns an array with the values reversed.
      Parameters:
      values - values.
      Returns:
      array with the values reversed.
    • firstIndexOf

      public static long firstIndexOf(float val, float... values)
      Returns the first index containing the value.
      Parameters:
      values - values.
      val - value to search for.
      Returns:
      first index containing the value or null, if the value is not present.
    • firstIndexOf

      public static long firstIndexOf(float val, FloatVector values)
      Returns the first index containing the value.
      Parameters:
      values - values.
      val - value to search for.
      Returns:
      first index containing the value or null, if the value is not present.
    • ifelse

      public static float ifelse(Boolean condition, float trueCase, float falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      trueCase value if condition is true, falseCase value if condition is false, or the Deephaven null constant if condition is null.
    • ifelse

      public static float[] ifelse(ObjectVector<Boolean> condition, FloatVector trueCase, FloatVector falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of float whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be the trueCase element if the condition element is true; the falseCase element if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if any of the inputs is null.
    • ifelse

      public static float[] ifelse(Boolean[] condition, float[] trueCase, float[] falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of float whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be the trueCase element if the condition element is true; the falseCase element if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if any of the inputs is null.
    • ifelse

      public static float[] ifelse(ObjectVector<Boolean> condition, float trueCase, float falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of float whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be trueCase if the condition element is true; falseCase if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if condition is null.
    • ifelse

      public static float[] ifelse(Boolean[] condition, float trueCase, float falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of float whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be trueCase if the condition element is true; falseCase if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if condition is null.
    • forwardFill

      public static float[] forwardFill(float... values)
      Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists. Otherwise (if no such value exists), replaces those elements with Deephaven null.
      Parameters:
      values - values.
      Returns:
      A copy of the specified array, with Deephaven null elements replaced as described above. If the specified array is null, returns null.
    • forwardFill

      public static float[] forwardFill(FloatVector values)
      Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists. Otherwise (if no such value exists), replaces those elements with Deephaven null.
      Parameters:
      values - values.
      Returns:
      A copy of the specified array, with Deephaven null elements replaced as described above. If the specified array is null, returns null.
    • isNull

      public static boolean isNull(double value)
      Determines if a value is considered by the Deephaven convention to be null. In the Deephaven convention, every simple type T has a special distinguished value NULL_T which is used to represent the null value for that type. These values are enumerated in the QueryConstants class.
      Parameters:
      value - value.
      Returns:
      true if the value is null according to the Deephaven convention, and false otherwise.
    • unbox

      public static double[] unbox(Double... values)
      Unboxes an array of values.
      Parameters:
      values - values.
      Returns:
      unboxed array of values.
    • replaceIfNull

      public static double replaceIfNull(double value, double replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      value - value.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      value, if value is not null according to Deephaven convention, replacement otherwise.
    • replaceIfNull

      public static double[] replaceIfNull(double[] values, double replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      values - the values.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      array containing value, if value is not null according to Deephaven convention, replacement otherwise.
    • replaceIfNull

      public static double[] replaceIfNull(DoubleVector values, double replacement)
      Replaces values that are null according to Deephaven convention with a specified value.
      Parameters:
      values - the values.
      replacement - replacement to use when value is null according to Deephaven convention.
      Returns:
      array containing value, if value is not null according to Deephaven convention, replacement otherwise.
    • len

      public static long len(double[] values)
      Returns the length of the input.
      Parameters:
      values - values.
      Returns:
      length of the input or the Deephaven null constant for null inputs.
    • count

      public static long count(double... values)
      Counts the number of non-null values.
      Parameters:
      values - values.
      Returns:
      number of non-null values.
    • count

      public static long count(DoubleVector values)
      Counts the number of non-null values.
      Parameters:
      values - values.
      Returns:
      number of non-null values.
    • last

      public static double last(DoubleVector values)
      Returns the last value from an array.
      Parameters:
      values - values.
      Returns:
      last value from the array.
    • last

      public static double last(double... values)
      Returns the last value from an array.
      Parameters:
      values - values.
      Returns:
      last value from the array.
    • first

      public static double first(DoubleVector values)
      Returns the first value from an array.
      Parameters:
      values - values.
      Returns:
      first value from the array.
    • first

      public static double first(double... values)
      Returns the first value from an array.
      Parameters:
      values - values.
      Returns:
      first value from the array.
    • nth

      public static double nth(long index, DoubleVector values)
      Returns the nth value from an array.
      Parameters:
      index - index of the value to return.
      values - values.
      Returns:
      nth value from the array or null, if the index is outside of the array's index range.
    • nth

      public static double nth(long index, double... values)
      Returns the nth value from an array.
      Parameters:
      index - index of the value to return.
      values - values.
      Returns:
      nth value from the array or null, if the index is outside of the array's index range.
    • array

      public static double[] array(DoubleVector values)
      Converts a Deephaven vector to a primitive array that may be freely mutated by the caller.
      Parameters:
      values - Deephaven vector
      Returns:
      primitive array, which may be freely mutated by the caller
    • vec

      public static DoubleVector vec(double... values)
      Converts a primitive array to a Deephaven vector.
      Parameters:
      values - primitive array
      Returns:
      Deephaven vector.
    • inRange

      public static boolean inRange(double testedValue, double lowInclusiveValue, double highInclusiveValue)
      Checks if a value is within a range.
      Parameters:
      testedValue - tested value.
      lowInclusiveValue - lower inclusive bound of the range.
      highInclusiveValue - upper inclusive bound of the range.
      Returns:
      true if the tested value is within the range, and false if the tested value is not in the range or is null.
    • in

      public static boolean in(double testedValues, double... possibleValues)
      Checks if a value is within a discrete set of possible values.
      Parameters:
      testedValues - tested value.
      possibleValues - possible values.
      Returns:
      true if the tested value is contained in the possible values, and false otherwise.
    • countDistinct

      public static long countDistinct(double... values)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      Returns:
      number of distinct non-null values.
    • countDistinct

      public static long countDistinct(DoubleVector values)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      Returns:
      number of distinct non-null values.
    • countDistinct

      public static long countDistinct(double[] values, boolean countNull)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      countNull - true to count null values, and false to exclude null values.
      Returns:
      number of distinct values.
    • countDistinct

      public static long countDistinct(DoubleVector values, boolean countNull)
      Counts the number of distinct elements in the array.
      Parameters:
      values - values.
      countNull - true to count null values, and false to exclude null values.
      Returns:
      number of distinct values.
    • distinct

      public static double[] distinct(double... values)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      Returns:
      unsorted array containing only distinct non-null items from arr.
    • distinct

      public static double[] distinct(DoubleVector values)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      Returns:
      unsorted array containing only distinct non-null items from arr.
    • distinct

      public static double[] distinct(double[] values, boolean includeNull)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      includeNull - true to include null values, and false to exclude null values.
      Returns:
      array containing only distinct items from arr.
    • distinct

      public static double[] distinct(DoubleVector values, boolean includeNull)
      Returns an array containing only the distinct values from the input.
      Parameters:
      values - values.
      includeNull - true to include null values, and false to exclude null values.
      Returns:
      array containing only distinct items from arr.
    • repeat

      public static double[] repeat(double value, int size)
      Returns an array with a value repeated.
      Parameters:
      value - value.
      size - number of times to repeat the value.
      Returns:
      array of repeated values. If size is less than zero, an empty array is returned.
    • enlist

      public static double[] enlist(double... values)
      Returns a list containing its arguments.
      Parameters:
      values - values.
      Returns:
      list containing values.
    • concat

      public static double[] concat(double[]... values)
      Returns the concatenation of multiple arrays into a single array.
      Parameters:
      values - values.
      Returns:
      concatenation of multiple arrays into a single array.
    • concat

      public static double[] concat(DoubleVector... values)
      Returns the concatenation of multiple arrays into a single array.
      Parameters:
      values - values.
      Returns:
      concatenation of multiple arrays into a single array.
    • reverse

      public static double[] reverse(double... values)
      Returns an array with the values reversed.
      Parameters:
      values - values.
      Returns:
      array with the values reversed.
    • reverse

      public static double[] reverse(DoubleVector values)
      Returns an array with the values reversed.
      Parameters:
      values - values.
      Returns:
      array with the values reversed.
    • firstIndexOf

      public static long firstIndexOf(double val, double... values)
      Returns the first index containing the value.
      Parameters:
      values - values.
      val - value to search for.
      Returns:
      first index containing the value or null, if the value is not present.
    • firstIndexOf

      public static long firstIndexOf(double val, DoubleVector values)
      Returns the first index containing the value.
      Parameters:
      values - values.
      val - value to search for.
      Returns:
      first index containing the value or null, if the value is not present.
    • ifelse

      public static double ifelse(Boolean condition, double trueCase, double falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      trueCase value if condition is true, falseCase value if condition is false, or the Deephaven null constant if condition is null.
    • ifelse

      public static double[] ifelse(ObjectVector<Boolean> condition, DoubleVector trueCase, DoubleVector falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of double whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be the trueCase element if the condition element is true; the falseCase element if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if any of the inputs is null.
    • ifelse

      public static double[] ifelse(Boolean[] condition, double[] trueCase, double[] falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of double whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be the trueCase element if the condition element is true; the falseCase element if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if any of the inputs is null.
    • ifelse

      public static double[] ifelse(ObjectVector<Boolean> condition, double trueCase, double falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of double whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be trueCase if the condition element is true; falseCase if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if condition is null.
    • ifelse

      public static double[] ifelse(Boolean[] condition, double trueCase, double falseCase)
      Returns elements from either trueCase or falseCase, depending on condition.
      Parameters:
      condition - a boolean value used to select output values.
      trueCase - value returned when condition is true.
      falseCase - value returned when condition is false.
      Returns:
      An array of double whose values are determined by the corresponding elements of condition, trueCase, and falseCase. The result element will be trueCase if the condition element is true; falseCase if the condition element is false; or the Deephaven null constant if the condition element is null. Returns null if condition is null.
    • forwardFill

      public static double[] forwardFill(double... values)
      Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists. Otherwise (if no such value exists), replaces those elements with Deephaven null.
      Parameters:
      values - values.
      Returns:
      A copy of the specified array, with Deephaven null elements replaced as described above. If the specified array is null, returns null.
    • forwardFill

      public static double[] forwardFill(DoubleVector values)
      Copies the specified array, replacing elements that represent null in the Deephaven convention by the most recently encountered non-null value if one exists. Otherwise (if no such value exists), replaces those elements with Deephaven null.
      Parameters:
      values - values.
      Returns:
      A copy of the specified array, with Deephaven null elements replaced as described above. If the specified array is null, returns null.