|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.jonclark.util.ArrayUtils
public class ArrayUtils
Utilities for working with arrays
| Constructor Summary | |
|---|---|
ArrayUtils()
|
|
| Method Summary | ||
|---|---|---|
static
|
arrayToString(boolean[] arr)
Convert an array into a string of the form {element1, element2, element3... |
|
static
|
arrayToString(double[] arr)
Convert an array into a string of the form {element1, element2, element3... |
|
static
|
arrayToString(float[] arr)
Convert an array into a string of the form {element1, element2, element3... |
|
static
|
arrayToString(int[] arr)
Convert an array into a string of the form {element1, element2, element3... |
|
static
|
arrayToString(long[] arr)
Convert an array into a string of the form {element1, element2, element3... |
|
static
|
arrayToString(T[] arr)
Convert an array into a string of the form {element1, element2, element3... |
|
static
|
arrayToVector(T[] arr)
(Somewhat) efficiently convert an array into a vector (requires a full copy of the array to the vector). |
|
static boolean |
sortedArrayContains(int[] arr,
int key)
Find out if a sorted array contains a value |
|
static boolean |
unsortedArrayContains(int[] arr,
int key)
Find out if an unsorted array contains a value |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayUtils()
| Method Detail |
|---|
public static <T> String arrayToString(T[] arr)
T - The type of the arrayarr - The array to be converted into string form
public static <T> String arrayToString(int[] arr)
T - The type of the arrayarr - The array to be converted into string form
public static <T> String arrayToString(long[] arr)
T - The type of the arrayarr - The array to be converted into string form
public static <T> String arrayToString(float[] arr)
T - The type of the arrayarr - The array to be converted into string form
public static <T> String arrayToString(double[] arr)
T - The type of the arrayarr - The array to be converted into string form
public static <T> String arrayToString(boolean[] arr)
T - The type of the arrayarr - The array to be converted into string form
public static <T> Vector<T> arrayToVector(T[] arr)
arr - The array to be converted into a vector
public static boolean sortedArrayContains(int[] arr,
int key)
arr - The array to be searchedkey - The value to find in the array
public static boolean unsortedArrayContains(int[] arr,
int key)
arr - The array to be searchedkey - The value to find in the array
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||