public class ArrayUtils
extends java.lang.Object
Constructor and Description |
---|
ArrayUtils() |
Modifier and Type | Method and Description |
---|---|
static int |
countOccurrences(java.lang.String s,
java.lang.String[] array)
Counts the number of occurrences of the given string in the given array
|
static java.lang.Double[] |
doubleToDoubleArray(double... a)
Converts a double[] to a Double[] (auto-boxing doesn't work for arrays...)
|
static double[] |
findExtremes(double[] a)
Returns the min and max values of the given array
|
static int |
getBinIndex(double value,
double[] bins) |
static int[] |
getLinearArray(int dim)
Initialises an array of the given size, with the value at each index corresponding to the index, i.e.
|
static double[] |
getLinearPercentageArray()
create a double[] which contains percentage values, i.e.
|
static java.lang.String |
toString(int... a)
A vararg wrapper around
Arrays.toString(int[]) |
static java.lang.String |
toString(int[] a,
int maxValues)
Gets a string representation just as
Arrays.toString(int[]) , but at most until the given max amount of
values. |
public static int[] getLinearArray(int dim)
public static java.lang.String toString(int[] a, int maxValues)
Arrays.toString(int[])
, but at most until the given max amount of
values.public static java.lang.String toString(int... a)
Arrays.toString(int[])
public static int countOccurrences(java.lang.String s, java.lang.String[] array)
public static int getBinIndex(double value, double[] bins)
public static double[] getLinearPercentageArray()
public static java.lang.Double[] doubleToDoubleArray(double... a)
public static double[] findExtremes(double[] a)