|
JAPI 0.9.0 Yet another Java API API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.japi.util.Arrays2
public final class Arrays2
This class provides some additional utility methods you might miss in Arrays
.
It is named Arrays2 so you have no problems using both, this class and java.util.Arrays
(no name conflict).
Arrays
Method Summary | ||
---|---|---|
static int |
binarySearch(int[] a,
int key,
int low,
int high)
Searches the specified array of ints for the specified value using the binary search algorithm. |
|
static boolean[] |
concat(boolean[]... a)
Concatenate Arrays together. |
|
static byte[] |
concat(byte[]... a)
Concatenate Arrays together. |
|
static char[] |
concat(char[]... a)
Concatenate Arrays together. |
|
static double[] |
concat(double[]... a)
Concatenate Arrays together. |
|
static float[] |
concat(float[]... a)
Concatenate Arrays together. |
|
static int[] |
concat(int[]... a)
Concatenate Arrays together. |
|
static long[] |
concat(long[]... a)
Concatenate Arrays together. |
|
static short[] |
concat(short[]... a)
Concatenate Arrays together. |
|
static
|
concat(T[]... a)
Concatenate Arrays together. |
|
static
|
count(Filter<? super T> filter,
T... a)
Count elements in an array that are accepted by the given filter. |
|
static
|
filter(Filter<? super T> filter,
T... a)
Returns an array only containing those elements accepted by the given filter. |
|
static int |
freq(boolean[] array,
boolean val)
Count the frequency of a specific boolean in an unsorted array of booleans. |
|
static int |
freq(boolean[] array,
int fromIndex,
int toIndex,
boolean val)
Count the frequency of a specific boolean in an unsorted array of booleans. |
|
static int |
freq(byte[] array,
byte val)
Count the frequency of a specific byte in an unsorted array of bytes. |
|
static int |
freq(byte[] array,
int fromIndex,
int toIndex,
byte val)
Count the frequency of a specific byte in an unsorted array of bytes. |
|
static int |
freq(char[] array,
char val)
Count the frequency of a specific char in an unsorted array of chars. |
|
static int |
freq(char[] array,
int fromIndex,
int toIndex,
char val)
Count the frequency of a specific char in an unsorted array of chars. |
|
static int |
freq(double[] array,
double val)
Count the frequency of a specific double in an unsorted array of doubles. |
|
static int |
freq(double[] array,
int fromIndex,
int toIndex,
double val)
Count the frequency of a specific double in an unsorted array of doubles. |
|
static int |
freq(float[] array,
float val)
Count the frequency of a specific float in an unsorted array of floats. |
|
static int |
freq(float[] array,
int fromIndex,
int toIndex,
float val)
Count the frequency of a specific float in an unsorted array of floats. |
|
static int |
freq(int[] array,
int val)
Count the frequency of a specific int in an unsorted array of ints. |
|
static int |
freq(int[] array,
int fromIndex,
int toIndex,
int val)
Count the frequency of a specific int in an unsorted array of ints. |
|
static int |
freq(long[] array,
int fromIndex,
int toIndex,
long val)
Count the frequency of a specific long in an unsorted array of longs. |
|
static int |
freq(long[] array,
long val)
Count the frequency of a specific long in an unsorted array of longs. |
|
static int |
freq(short[] array,
int fromIndex,
int toIndex,
short val)
Count the frequency of a specific short in an unsorted array of shorts. |
|
static int |
freq(short[] array,
short val)
Count the frequency of a specific short in an unsorted array of shorts. |
|
static
|
freqComparable(T[] array,
int fromIndex,
int toIndex,
T val)
Count the frequency of a specific Comparable in an unsorted array of Comparables. |
|
static
|
freqComparable(T[] array,
T val)
Count the frequency of a specific Comparable in an unsorted array of Comparables. |
|
static
|
freqComparator(T[] array,
int fromIndex,
int toIndex,
T val,
Comparator<? super T> comparator)
Count the frequency of a specific Object in an unsorted array of Objects. |
|
static
|
freqComparator(T[] array,
T val,
Comparator<? super T> comparator)
Count the frequency of a specific Object in an unsorted array of Objects. |
|
static int |
freqEquals(Object[] array,
int fromIndex,
int toIndex,
Object val)
Count the frequency of a specific Object in an unsorted array of Objects. |
|
static int |
freqEquals(Object[] array,
Object val)
Count the frequency of a specific Object in an unsorted array of Objects. |
|
static int |
freqIdentity(Object[] array,
int fromIndex,
int toIndex,
Object val)
Count the frequency of a specific Object in an unsorted array of Objects. |
|
static int |
freqIdentity(Object[] array,
Object val)
Count the frequency of a specific Object in an unsorted array of Objects. |
|
static
|
linearComparisonSearch(T o,
int fromIndex,
int toIndex,
T[] data,
Comparator<? super T> comp)
Perform a linear search on an array of Objects. |
|
static
|
linearComparisonSearch(T o,
T[] data,
Comparator<? super T> comp)
Perform a linear search on an array of Objects. |
|
static int |
linearEqualitySearch(Object o,
int fromIndex,
int toIndex,
Object[] data)
Perform a linear search on an array of Objects. |
|
static int |
linearEqualitySearch(Object o,
Object[] data)
Perform a linear search on an array of Objects. |
|
static int |
linearIdentitySearch(Object o,
int fromIndex,
int toIndex,
Object[] data)
Perform a linear search on an array of Objects. |
|
static int |
linearIdentitySearch(Object o,
Object[] data)
Perform a linear search on an array of Objects. |
|
static int |
linearSearch(boolean z,
boolean[] data)
Perform a linear search on an array of booleans. |
|
static int |
linearSearch(boolean z,
int fromIndex,
int toIndex,
boolean[] data)
Perform a linear search on an array of booleans. |
|
static int |
linearSearch(byte b,
byte[] data)
Perform a linear search on an array of bytes. |
|
static int |
linearSearch(byte b,
int fromIndex,
int toIndex,
byte[] data)
Perform a linear search on an array of bytes. |
|
static int |
linearSearch(char c,
char[] data)
Perform a linear search on an array of chars. |
|
static int |
linearSearch(char c,
int fromIndex,
int toIndex,
char[] data)
Perform a linear search on an array of chars. |
|
static int |
linearSearch(double d,
double[] data)
Perform a linear search on an array of doubles. |
|
static int |
linearSearch(double d,
int fromIndex,
int toIndex,
double[] data)
Perform a linear search on an array of doubles. |
|
static int |
linearSearch(float f,
float[] data)
Perform a linear search on an array of floats. |
|
static int |
linearSearch(float f,
int fromIndex,
int toIndex,
float[] data)
Perform a linear search on an array of floats. |
|
static int |
linearSearch(int n,
int[] data)
Perform a linear search on an array of ints. |
|
static int |
linearSearch(int n,
int fromIndex,
int toIndex,
int[] data)
Perform a linear search on an array of ints. |
|
static int |
linearSearch(long l,
int fromIndex,
int toIndex,
long[] data)
Perform a linear search on an array of longs. |
|
static int |
linearSearch(long l,
long[] data)
Perform a linear search on an array of longs. |
|
static int |
linearSearch(short s,
int fromIndex,
int toIndex,
short[] data)
Perform a linear search on an array of shorts. |
|
static int |
linearSearch(short s,
short[] data)
Perform a linear search on an array of shorts. |
|
static void |
shuffle(boolean[] array)
Shuffle an array of booleans. |
|
static void |
shuffle(boolean[] array,
int fromIndex,
int toIndex)
Shuffle an array of booleans. |
|
static void |
shuffle(boolean[] array,
int fromIndex,
int toIndex,
Random rnd)
Shuffle an array of booleans. |
|
static void |
shuffle(boolean[] array,
Random rnd)
Shuffle an array of booleans. |
|
static void |
shuffle(byte[] array)
Shuffle an array of bytes. |
|
static void |
shuffle(byte[] array,
int fromIndex,
int toIndex)
Shuffle an array of bytes. |
|
static void |
shuffle(byte[] array,
int fromIndex,
int toIndex,
Random rnd)
Shuffle an array of bytes. |
|
static void |
shuffle(byte[] array,
Random rnd)
Shuffle an array of bytes. |
|
static void |
shuffle(char[] array)
Shuffle an array of chars. |
|
static void |
shuffle(char[] array,
int fromIndex,
int toIndex)
Shuffle an array of chars. |
|
static void |
shuffle(char[] array,
int fromIndex,
int toIndex,
Random rnd)
Shuffle an array of chars. |
|
static void |
shuffle(char[] array,
Random rnd)
Shuffle an array of chars. |
|
static void |
shuffle(double[] array)
Shuffle an array of doubles. |
|
static void |
shuffle(double[] array,
int fromIndex,
int toIndex)
Shuffle an array of doubles. |
|
static void |
shuffle(double[] array,
int fromIndex,
int toIndex,
Random rnd)
Shuffle an array of doubles. |
|
static void |
shuffle(double[] array,
Random rnd)
Shuffle an array of doubles. |
|
static void |
shuffle(float[] array)
Shuffle an array of floats. |
|
static void |
shuffle(float[] array,
int fromIndex,
int toIndex)
Shuffle an array of floats. |
|
static void |
shuffle(float[] array,
int fromIndex,
int toIndex,
Random rnd)
Shuffle an array of floats. |
|
static void |
shuffle(float[] array,
Random rnd)
Shuffle an array of floats. |
|
static void |
shuffle(int[] array)
Shuffle an array of ints. |
|
static void |
shuffle(int[] array,
int fromIndex,
int toIndex)
Shuffle an array of ints. |
|
static void |
shuffle(int[] array,
int fromIndex,
int toIndex,
Random rnd)
Shuffle an array of ints. |
|
static void |
shuffle(int[] array,
Random rnd)
Shuffle an array of ints. |
|
static void |
shuffle(long[] array)
Shuffle an array of longs. |
|
static void |
shuffle(long[] array,
int fromIndex,
int toIndex)
Shuffle an array of longs. |
|
static void |
shuffle(long[] array,
int fromIndex,
int toIndex,
Random rnd)
Shuffle an array of longs. |
|
static void |
shuffle(long[] array,
Random rnd)
Shuffle an array of longs. |
|
static void |
shuffle(Object[] array)
Shuffle an array of Objects. |
|
static void |
shuffle(Object[] array,
int fromIndex,
int toIndex)
Shuffle an array of Objects. |
|
static void |
shuffle(Object[] array,
int fromIndex,
int toIndex,
Random rnd)
Shuffle an array of Objects. |
|
static void |
shuffle(Object[] array,
Random rnd)
Shuffle an array of Objects. |
|
static void |
shuffle(short[] array)
Shuffle an array of shorts. |
|
static void |
shuffle(short[] array,
int fromIndex,
int toIndex)
Shuffle an array of shorts. |
|
static void |
shuffle(short[] array,
int fromIndex,
int toIndex,
Random rnd)
Shuffle an array of shorts. |
|
static void |
shuffle(short[] array,
Random rnd)
Shuffle an array of shorts. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static double[] concat(double[]... a)
a
- Arrays to concatenate
public static float[] concat(float[]... a)
a
- Arrays to concatenate
public static long[] concat(long[]... a)
a
- Arrays to concatenate
public static int[] concat(int[]... a)
a
- Arrays to concatenate
public static short[] concat(short[]... a)
a
- Arrays to concatenate
public static char[] concat(char[]... a)
a
- Arrays to concatenate
public static byte[] concat(byte[]... a)
a
- Arrays to concatenate
public static boolean[] concat(boolean[]... a)
a
- Arrays to concatenate
public static <T> T[] concat(T[]... a)
a
- Arrays to concatenate
public static <T> T[] filter(Filter<? super T> filter, T... a)
a
- Elements to filterfilter
- Filter to use for a
Collections2.filter(Collection,Filter)
public static <T> int count(Filter<? super T> filter, T... a)
a
- Elements to count infilter
- Filter to use for a
public static int binarySearch(int[] a, int key, int low, int high)
a
- the array to be searched.key
- the value to be searched for.low
- lower border (must be >= 0
)high
- upper border (must be < a.length
)
ArrayIndexOutOfBoundsException
- if low < 0
or high >= a.length
Arrays.binarySearch(int[],int)
,
Arrays.sort(int[])
public static int linearSearch(boolean z, boolean[] data)
z
- boolean to find in datadata
- array of booleans to perform linear search on
public static int linearSearch(char c, char[] data)
c
- char to find in datadata
- array of chars to perform linear search on
public static int linearSearch(double d, double[] data)
d
- double to find in datadata
- array of doubles to perform linear search on
public static int linearSearch(float f, float[] data)
f
- float to find in datadata
- array of floats to perform linear search on
public static int linearSearch(long l, long[] data)
l
- long to find in datadata
- array of longs to perform linear search on
public static int linearSearch(int n, int[] data)
n
- int to find in datadata
- array of ints to perform linear search on
public static int linearSearch(short s, short[] data)
s
- short to find in datadata
- array of shorts to perform linear search on
public static int linearSearch(byte b, byte[] data)
b
- byte to find in datadata
- array of bytes to perform linear search on
public static int linearSearch(boolean z, int fromIndex, int toIndex, boolean[] data)
z
- boolean to find in datafromIndex
- start index within datatoIndex
- end index within datadata
- array of booleans to perform linear search on
ArrayIndexOutOfBoundsException
- in case fromIndex < 0
or toIndex >= data.length
public static int linearSearch(char c, int fromIndex, int toIndex, char[] data)
c
- char to find in datafromIndex
- start index within datatoIndex
- end index within datadata
- array of chars to perform linear search on
ArrayIndexOutOfBoundsException
- in case fromIndex < 0
or toIndex >= data.length
public static int linearSearch(double d, int fromIndex, int toIndex, double[] data)
d
- double to find in datafromIndex
- start index within datatoIndex
- end index within datadata
- array of doubles to perform linear search on
ArrayIndexOutOfBoundsException
- in case fromIndex < 0
or toIndex >= data.length
public static int linearSearch(float f, int fromIndex, int toIndex, float[] data)
f
- float to find in datafromIndex
- start index within datatoIndex
- end index within datadata
- array of floats to perform linear search on
ArrayIndexOutOfBoundsException
- in case fromIndex < 0
or toIndex >= data.length
public static int linearSearch(long l, int fromIndex, int toIndex, long[] data)
l
- long to find in datafromIndex
- start index within datatoIndex
- end index within datadata
- array of longs to perform linear search on
ArrayIndexOutOfBoundsException
- in case fromIndex < 0
or toIndex >= data.length
public static int linearSearch(int n, int fromIndex, int toIndex, int[] data)
n
- int to find in datafromIndex
- start index within datatoIndex
- end index within datadata
- array of ints to perform linear search on
ArrayIndexOutOfBoundsException
- in case fromIndex < 0
or toIndex >= data.length
public static int linearSearch(short s, int fromIndex, int toIndex, short[] data)
s
- short to find in datafromIndex
- start index within datatoIndex
- end index within datadata
- array of shorts to perform linear search on
ArrayIndexOutOfBoundsException
- in case fromIndex < 0
or toIndex >= data.length
public static int linearSearch(byte b, int fromIndex, int toIndex, byte[] data)
b
- byte to find in datafromIndex
- start index within datatoIndex
- end index within datadata
- array of bytes to perform linear search on
ArrayIndexOutOfBoundsException
- in case fromIndex < 0
or toIndex >= data.length
public static int linearIdentitySearch(Object o, Object[] data)
o
- Object to find in datadata
- array of Objects to perform linear search on
public static int linearIdentitySearch(Object o, int fromIndex, int toIndex, Object[] data)
o
- Object to find in datafromIndex
- start index within datatoIndex
- end index within datadata
- array of Objects to perform linear search on
ArrayIndexOutOfBoundsException
- in case fromIndex < 0
or toIndex >= data.length
public static int linearEqualitySearch(Object o, Object[] data)
o
- Object to find in datadata
- array of Objects to perform linear search on
public static int linearEqualitySearch(Object o, int fromIndex, int toIndex, Object[] data)
o
- Object to find in datafromIndex
- start index within datatoIndex
- end index within datadata
- array of Objects to perform linear search on
ArrayIndexOutOfBoundsException
- in case fromIndex < 0
or toIndex >= data.length
public static <T> int linearComparisonSearch(T o, T[] data, Comparator<? super T> comp)
o
- Object to find in datadata
- array of Objects to perform linear search on
public static <T> int linearComparisonSearch(T o, int fromIndex, int toIndex, T[] data, Comparator<? super T> comp)
o
- Object to find in datafromIndex
- start index within datatoIndex
- end index within datadata
- array of Objects to perform linear search on
ArrayIndexOutOfBoundsException
- in case fromIndex < 0
or toIndex >= data.length
public static void shuffle(boolean[] array)
array
- Array to shufflepublic static void shuffle(boolean[] array, Random rnd)
array
- Array to shufflernd
- Random Number Generatorpublic static void shuffle(boolean[] array, int fromIndex, int toIndex)
array
- Array to shufflefromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)public static void shuffle(boolean[] array, int fromIndex, int toIndex, Random rnd)
array
- Array to shufflefromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)rnd
- Random number generatorpublic static void shuffle(char[] array)
array
- Array to shufflepublic static void shuffle(char[] array, Random rnd)
array
- Array to shufflernd
- Random Number Generatorpublic static void shuffle(char[] array, int fromIndex, int toIndex)
array
- Array to shufflefromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)public static void shuffle(char[] array, int fromIndex, int toIndex, Random rnd)
array
- Array to shufflefromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)rnd
- Random number generatorpublic static void shuffle(byte[] array)
array
- Array to shufflepublic static void shuffle(byte[] array, Random rnd)
array
- Array to shufflernd
- Random Number Generatorpublic static void shuffle(byte[] array, int fromIndex, int toIndex)
array
- Array to shufflefromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)public static void shuffle(byte[] array, int fromIndex, int toIndex, Random rnd)
array
- Array to shufflefromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)rnd
- Random number generatorpublic static void shuffle(short[] array)
array
- Array to shufflepublic static void shuffle(short[] array, Random rnd)
array
- Array to shufflernd
- Random Number Generatorpublic static void shuffle(short[] array, int fromIndex, int toIndex)
array
- Array to shufflefromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)public static void shuffle(short[] array, int fromIndex, int toIndex, Random rnd)
array
- Array to shufflefromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)rnd
- Random number generatorpublic static void shuffle(int[] array)
array
- Array to shufflepublic static void shuffle(int[] array, Random rnd)
array
- Array to shufflernd
- Random Number Generatorpublic static void shuffle(int[] array, int fromIndex, int toIndex)
array
- Array to shufflefromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)public static void shuffle(int[] array, int fromIndex, int toIndex, Random rnd)
array
- Array to shufflefromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)rnd
- Random number generatorpublic static void shuffle(long[] array)
array
- Array to shufflepublic static void shuffle(long[] array, Random rnd)
array
- Array to shufflernd
- Random Number Generatorpublic static void shuffle(long[] array, int fromIndex, int toIndex)
array
- Array to shufflefromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)public static void shuffle(long[] array, int fromIndex, int toIndex, Random rnd)
array
- Array to shufflefromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)rnd
- Random number generatorpublic static void shuffle(float[] array)
array
- Array to shufflepublic static void shuffle(float[] array, Random rnd)
array
- Array to shufflernd
- Random Number Generatorpublic static void shuffle(float[] array, int fromIndex, int toIndex)
array
- Array to shufflefromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)public static void shuffle(float[] array, int fromIndex, int toIndex, Random rnd)
array
- Array to shufflefromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)rnd
- Random number generatorpublic static void shuffle(double[] array)
array
- Array to shufflepublic static void shuffle(double[] array, Random rnd)
array
- Array to shufflernd
- Random Number Generatorpublic static void shuffle(double[] array, int fromIndex, int toIndex)
array
- Array to shufflefromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)public static void shuffle(double[] array, int fromIndex, int toIndex, Random rnd)
array
- Array to shufflefromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)rnd
- Random number generatorpublic static void shuffle(Object[] array)
array
- Array to shufflepublic static void shuffle(Object[] array, Random rnd)
array
- Array to shufflernd
- Random Number Generatorpublic static void shuffle(Object[] array, int fromIndex, int toIndex)
array
- Array to shufflefromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)public static void shuffle(Object[] array, int fromIndex, int toIndex, Random rnd)
array
- Array to shufflefromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)rnd
- Random number generatorpublic static int freq(boolean[] array, boolean val)
array
- Array of booleans to count inval
- boolean value to count frequency of
public static int freq(boolean[] array, int fromIndex, int toIndex, boolean val)
array
- Array of booleans to count infromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)val
- boolean value to count frequency of
public static int freq(char[] array, char val)
array
- Array of chars to count inval
- char value to count frequency of
public static int freq(char[] array, int fromIndex, int toIndex, char val)
array
- Array of chars to count infromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)val
- char value to count frequency of
public static int freq(byte[] array, byte val)
array
- Array of bytes to count inval
- byte value to count frequency of
public static int freq(byte[] array, int fromIndex, int toIndex, byte val)
array
- Array of bytes to count infromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)val
- byte value to count frequency of
public static int freq(short[] array, short val)
array
- Array of shorts to count inval
- short value to count frequency of
public static int freq(short[] array, int fromIndex, int toIndex, short val)
array
- Array of shorts to count infromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)val
- short value to count frequency of
public static int freq(int[] array, int val)
array
- Array of ints to count inval
- int value to count frequency of
public static int freq(int[] array, int fromIndex, int toIndex, int val)
array
- Array of ints to count infromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)val
- int value to count frequency of
public static int freq(long[] array, long val)
array
- Array of longs to count inval
- long value to count frequency of
public static int freq(long[] array, int fromIndex, int toIndex, long val)
array
- Array of longs to count infromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)val
- long value to count frequency of
public static int freq(float[] array, float val)
array
- Array of floats to count inval
- float value to count frequency of
public static int freq(float[] array, int fromIndex, int toIndex, float val)
array
- Array of floats to count infromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)val
- float value to count frequency of
public static int freq(double[] array, double val)
array
- Array of doubles to count inval
- double value to count frequency of
public static int freq(double[] array, int fromIndex, int toIndex, double val)
array
- Array of doubles to count infromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)val
- double value to count frequency of
public static int freqIdentity(Object[] array, Object val)
array
- Array of Objects to count inval
- Object value to count frequency of
public static int freqIdentity(Object[] array, int fromIndex, int toIndex, Object val)
array
- Array of Objects to count infromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)val
- Object value to count frequency of
public static int freqEquals(Object[] array, Object val)
array
- Array of Objects to count inval
- Object value to count frequency of
public static int freqEquals(Object[] array, int fromIndex, int toIndex, Object val)
array
- Array of Objects to count infromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)val
- Object value to count frequency of
public static <T extends Comparable<T>> int freqComparable(T[] array, T val)
array
- Array of Comparables to count inval
- Comparable value to count frequency of
public static <T extends Comparable<T>> int freqComparable(T[] array, int fromIndex, int toIndex, T val)
array
- Array of Comparables to count infromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)val
- Comparable value to count frequency of
public static <T> int freqComparator(T[] array, T val, Comparator<? super T> comparator)
array
- Array of Objects to count inval
- Object value to count frequency ofcomparator
- Comparator for comparing objects
public static <T> int freqComparator(T[] array, int fromIndex, int toIndex, T val, Comparator<? super T> comparator)
array
- Array of Objects to count infromIndex
- Start index to shuffle at (inclusive)toIndex
- End index to shuffle at (exclusive)val
- Object value to count frequency ofcomparator
- Comparator for comparing objects
|
JAPI Yet another Java API API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |