|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fest.swing.util.Arrays
public final class Arrays
Understands utility methods for arrays.
Method Summary | ||
---|---|---|
static int[] |
copyOf(int[] array)
Creates and returns a copy of the given array. |
|
static
|
copyOf(T[] array)
Creates and returns a copy of the given array. |
|
static boolean |
equal(String[][] one,
String[][] two)
Verifies that the given String arrays are equal. |
|
static String |
format(String[][] array)
Formats a two-dimensional String array. |
|
static boolean |
isEmptyIntArray(int[] array)
Indicates whether the given array is null or empty. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean equal(String[][] one, String[][] two)
String
arrays are equal.
one
- the first array.two
- the second array.
true
if the arrays are equal, false
otherwise.public static String format(String[][] array)
String
array. For example, the array:
String[][] array = { { "0-0", "0-1", "0-2" }, { "1-0", "1-1", "1-2" }, { "2-0", "2-1", "2-2" }, { "3-0", "3-1", "3-2" }, };will be formatted as:
[['0-0', '0-1', '0-2'], ['1-0', '1-1', '1-2'], ['2-0', '2-1', '2-2'], ['3-0', '3-1', '3-2']]
array
- the array to format.
public static int[] copyOf(int[] array)
array
- the array to copy.
NullPointerException
- if the array to copy is null
.public static <T> T[] copyOf(T[] array)
T
- the generic type of the array.array
- the array to copy.
NullPointerException
- if the array to copy is null
.public static boolean isEmptyIntArray(int[] array)
null
or empty.
array
- the array to check.
true
if the given array is null
or empty; false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |