|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jagatoo.util.arrays.ArrayUtils
public final class ArrayUtils
Helper class for array operations.
Method Summary | ||
---|---|---|
static boolean |
contains(byte[] array,
byte element)
Checks, if the specified array contains the specified element. |
|
static boolean |
contains(byte[] array,
int start,
int limit,
byte element)
Checks, if the specified array contains the specified element. |
|
static boolean |
contains(double[] array,
double element)
Checks, if the specified array contains the specified element. |
|
static boolean |
contains(double[] array,
int start,
int limit,
double element)
Checks, if the specified array contains the specified element. |
|
static boolean |
contains(float[] array,
float element)
Checks, if the specified array contains the specified element. |
|
static boolean |
contains(float[] array,
int start,
int limit,
float element)
Checks, if the specified array contains the specified element. |
|
static boolean |
contains(int[] array,
int element)
Checks, if the specified array contains the specified element. |
|
static boolean |
contains(int[] array,
int start,
int limit,
int element)
Checks, if the specified array contains the specified element. |
|
static boolean |
contains(long[] array,
int start,
int limit,
long element)
Checks, if the specified array contains the specified element. |
|
static boolean |
contains(long[] array,
long element)
Checks, if the specified array contains the specified element. |
|
static boolean |
contains(java.lang.Object[] array,
int start,
int limit,
java.lang.Object element,
boolean strict)
Checks, if the specified array contains the specified element. |
|
static boolean |
contains(java.lang.Object[] array,
java.lang.Object element,
boolean strict)
Checks, if the specified array contains the specified element. |
|
static boolean |
contains(short[] array,
int start,
int limit,
short element)
Checks, if the specified array contains the specified element. |
|
static boolean |
contains(short[] array,
short element)
Checks, if the specified array contains the specified element. |
|
static void |
dumpArray(byte[] array,
boolean handleLikeUnsigned)
Dumps the contents of the given array to stdout (in one line). |
|
static void |
dumpArray(byte[] array,
boolean handleLikeUnsigned,
int maxElemsPerLine)
Dumps the contents of the given array to stdout. |
|
static void |
dumpArray(double[] array)
Dumps the contents of the given array to stdout (in one line). |
|
static void |
dumpArray(double[] array,
int maxElemsPerLine)
Dumps the contents of the given array to stdout. |
|
static void |
dumpArray(float[] array)
Dumps the contents of the given array to stdout (in one line). |
|
static void |
dumpArray(float[] array,
int maxElemsPerLine)
Dumps the contents of the given array to stdout. |
|
static void |
dumpArray(int[] array)
Dumps the contents of the given array to stdout (in one line). |
|
static void |
dumpArray(int[] array,
int maxElemsPerLine)
Dumps the contents of the given array to stdout. |
|
static void |
dumpArray(short[] array)
Dumps the contents of the given array to stdout (in one line). |
|
static void |
dumpArray(short[] array,
int maxElemsPerLine)
Dumps the contents of the given array to stdout. |
|
static
|
ensureCapacity(E[] array,
java.lang.Class<?> elementType,
int minCapacity)
Ensures, the given int array has the desired length. |
|
static float[] |
ensureCapacity(float[] array,
int minCapacity)
Ensures, the given int array has the desired length. |
|
static float[] |
ensureCapacity(float[] array,
int minCapacity,
int paddValue)
Ensures, the given int array has the desired length. |
|
static int[] |
ensureCapacity(int[] array,
int minCapacity)
Ensures, the given int array has the desired length. |
|
static int[] |
ensureCapacity(int[] array,
int minCapacity,
int paddValue)
Ensures, the given int array has the desired length. |
|
static java.lang.Integer[] |
ensureCapacity(java.lang.Integer[] array,
int minCapacity)
Ensures, the given int array has the desired length. |
|
static long[] |
ensureCapacity(long[] array,
int minCapacity)
Ensures, the given int array has the desired length. |
|
static long[] |
ensureCapacity(long[] array,
int minCapacity,
int paddValue)
Ensures, the given int array has the desired length. |
|
static boolean |
equals(float[] a,
float[] b)
|
|
static int |
indexOf(byte[] array,
byte element)
Searches the specified element inside the specified array. |
|
static int |
indexOf(byte[] array,
int start,
int limit,
byte element)
Searches the specified element inside the specified array. |
|
static int |
indexOf(double[] array,
double element)
Searches the specified element inside the specified array. |
|
static int |
indexOf(double[] array,
int start,
int limit,
double element)
Searches the specified element inside the specified array. |
|
static int |
indexOf(float[] array,
float element)
Searches the specified element inside the specified array. |
|
static int |
indexOf(float[] array,
int start,
int limit,
float element)
Searches the specified element inside the specified array. |
|
static int |
indexOf(int[] array,
int element)
Searches the specified element inside the specified array. |
|
static int |
indexOf(int[] array,
int start,
int limit,
int element)
Searches the specified element inside the specified array. |
|
static int |
indexOf(long[] array,
int start,
int limit,
long element)
Searches the specified element inside the specified array. |
|
static int |
indexOf(long[] array,
long element)
Searches the specified element inside the specified array. |
|
static int |
indexOf(java.lang.Object[] array,
int start,
int limit,
java.lang.Object element,
boolean strict)
Searches the specified element inside the specified array. |
|
static int |
indexOf(java.lang.Object[] array,
java.lang.Object element,
boolean strict)
Searches the specified element inside the specified array. |
|
static int |
indexOf(short[] array,
int start,
int limit,
short element)
Searches the specified element inside the specified array. |
|
static int |
indexOf(short[] array,
short element)
Searches the specified element inside the specified array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static final boolean equals(float[] a, float[] b)
a
- b
-
public static final void dumpArray(float[] array, int maxElemsPerLine)
array
- maxElemsPerLine
- public static final void dumpArray(float[] array)
array
- public static final void dumpArray(double[] array, int maxElemsPerLine)
array
- maxElemsPerLine
- public static final void dumpArray(double[] array)
array
- public static final void dumpArray(int[] array, int maxElemsPerLine)
array
- maxElemsPerLine
- public static final void dumpArray(int[] array)
array
- public static final void dumpArray(short[] array, int maxElemsPerLine)
array
- maxElemsPerLine
- public static final void dumpArray(short[] array)
array
- public static final void dumpArray(byte[] array, boolean handleLikeUnsigned, int maxElemsPerLine)
array
- handleLikeUnsigned
- maxElemsPerLine
- public static final void dumpArray(byte[] array, boolean handleLikeUnsigned)
array
- handleLikeUnsigned
- public static final int[] ensureCapacity(int[] array, int minCapacity)
array
- the input arrayminCapacity
- the desired (minimal) capacity
public static final java.lang.Integer[] ensureCapacity(java.lang.Integer[] array, int minCapacity)
array
- the input arrayminCapacity
- the desired (minimal) capacity
public static final int[] ensureCapacity(int[] array, int minCapacity, int paddValue)
array
- the input arrayminCapacity
- the desired (minimal) capacitypaddValue
- the value to be written to appended elements
public static final long[] ensureCapacity(long[] array, int minCapacity)
array
- the input arrayminCapacity
- the desired (minimal) capacity
public static final long[] ensureCapacity(long[] array, int minCapacity, int paddValue)
array
- the input arrayminCapacity
- the desired (minimal) capacitypaddValue
- the value to be written to appended elements
public static final float[] ensureCapacity(float[] array, int minCapacity)
array
- the input arrayminCapacity
- the desired (minimal) capacity
public static final float[] ensureCapacity(float[] array, int minCapacity, int paddValue)
array
- the input arrayminCapacity
- the desired (minimal) capacitypaddValue
- the value to be written to appended elements
public static final <E> E[] ensureCapacity(E[] array, java.lang.Class<?> elementType, int minCapacity)
E
- array
- the input arrayelementType
- minCapacity
- the desired (minimal) capacity
public static final boolean contains(byte[] array, int start, int limit, byte element)
array
- the array to checkstart
- the index in the source array to start the search atlimit
- the index in the source array of the last element to be testedelement
- the element to search
true
, if the array contains the specified element.public static final boolean contains(byte[] array, byte element)
array
- the array to checkelement
- the element to search
true
, if the array contains the specified element.public static final boolean contains(short[] array, int start, int limit, short element)
array
- the array to checkstart
- the index in the source array to start the search atlimit
- the index in the source array of the last element to be testedelement
- the element to search
true
, if the array contains the specified element.public static final boolean contains(short[] array, short element)
array
- the array to checkelement
- the element to search
true
, if the array contains the specified element.public static final boolean contains(int[] array, int start, int limit, int element)
array
- the array to checkstart
- the index in the source array to start the search atlimit
- the index in the source array of the last element to be testedelement
- the element to search
true
, if the array contains the specified element.public static final boolean contains(int[] array, int element)
array
- the array to checkelement
- the element to search
true
, if the array contains the specified element.public static final boolean contains(long[] array, int start, int limit, long element)
array
- the array to checkstart
- the index in the source array to start the search atlimit
- the index in the source array of the last element to be testedelement
- the element to search
true
, if the array contains the specified element.public static final boolean contains(long[] array, long element)
array
- the array to checkelement
- the element to search
true
, if the array contains the specified element.public static final boolean contains(float[] array, int start, int limit, float element)
array
- the array to checkstart
- the index in the source array to start the search atlimit
- the index in the source array of the last element to be testedelement
- the element to search
true
, if the array contains the specified element.public static final boolean contains(float[] array, float element)
array
- the array to checkelement
- the element to search
true
, if the array contains the specified element.public static final boolean contains(double[] array, int start, int limit, double element)
array
- the array to checkstart
- the index in the source array to start the search atlimit
- the index in the source array of the last element to be testedelement
- the element to search
true
, if the array contains the specified element.public static final boolean contains(double[] array, double element)
array
- the array to checkelement
- the element to search
true
, if the array contains the specified element.public static final boolean contains(java.lang.Object[] array, int start, int limit, java.lang.Object element, boolean strict)
array
- the array to checkstart
- the index in the source array to start the search atlimit
- the index in the source array of the last element to be testedelement
- the element to searchstrict
- if true
, a == check is used to identify the element, otherwise, the equals method is used.
true
, if the array contains the specified element.public static final boolean contains(java.lang.Object[] array, java.lang.Object element, boolean strict)
array
- the array to checkelement
- the element to searchstrict
- if true
, a == check is used to identify the element, otherwise, the equals method is used.
true
, if the array contains the specified element.public static final int indexOf(byte[] array, int start, int limit, byte element)
array
- the array to checkstart
- the index in the source array to start the search atlimit
- the index in the source array of the last element to be testedelement
- the element to search
public static final int indexOf(byte[] array, byte element)
array
- the array to checkelement
- the element to search
public static final int indexOf(short[] array, int start, int limit, short element)
array
- the array to checkstart
- the index in the source array to start the search atlimit
- the index in the source array of the last element to be testedelement
- the element to search
public static final int indexOf(short[] array, short element)
array
- the array to checkelement
- the element to search
public static final int indexOf(int[] array, int start, int limit, int element)
array
- the array to checkstart
- the index in the source array to start the search atlimit
- the index in the source array of the last element to be testedelement
- the element to search
public static final int indexOf(int[] array, int element)
array
- the array to checkelement
- the element to search
public static final int indexOf(long[] array, int start, int limit, long element)
array
- the array to checkstart
- the index in the source array to start the search atlimit
- the index in the source array of the last element to be testedelement
- the element to search
public static final int indexOf(long[] array, long element)
array
- the array to checkelement
- the element to search
public static final int indexOf(float[] array, int start, int limit, float element)
array
- the array to checkstart
- the index in the source array to start the search atlimit
- the index in the source array of the last element to be testedelement
- the element to search
public static final int indexOf(float[] array, float element)
array
- the array to checkelement
- the element to search
public static final int indexOf(double[] array, int start, int limit, double element)
array
- the array to checkstart
- the index in the source array to start the search atlimit
- the index in the source array of the last element to be testedelement
- the element to search
public static final int indexOf(double[] array, double element)
array
- the array to checkelement
- the element to search
public static final int indexOf(java.lang.Object[] array, int start, int limit, java.lang.Object element, boolean strict)
array
- the array to checkstart
- the index in the source array to start the search atlimit
- the index in the source array of the last element to be testedelement
- the element to searchstrict
- if true
, a == check is used to identify the element, otherwise, the equals method is used.
public static final int indexOf(java.lang.Object[] array, java.lang.Object element, boolean strict)
array
- the array to checkelement
- the element to searchstrict
- if true
, a == check is used to identify the element, otherwise, the equals method is used.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |