public final class ArrayUtils extends Object
Arrays.| Modifier and Type | Method and Description |
|---|---|
static Object[] |
added(Object[] xs,
Object y)
Add an Object to an Array.
|
static Object[] |
arrayOf(Enumeration<Object> e)
Create an Array from an Enumeration.
|
static <T> T[] |
arrayOf(Vector<T> v)
Create an Array from a Vector.
|
static Object[] |
concatenated(Object[] xs,
Object[] ys)
Create a new Array from two Arrays.
|
static boolean |
contains(Object[] xs,
Object x)
Whether an Array contains an Object.
|
static int |
indexOf(Object[] xs,
Object x)
Lookup the first instance of an Object in an Array.
|
static Object[] |
removed(Object[] xs,
Object y)
Remove an Object from an Array.
|
static Object[] |
section(Object[] xs,
int start,
int limit)
Extract a subsection of an Array.
|
public static <T> T[] arrayOf(Vector<T> v)
v - the Vectorpublic static Object[] arrayOf(Enumeration<Object> e)
e - the Enumerationpublic static Object[] added(Object[] xs, Object y)
xs - the array to add toy - the object to addpublic static Object[] removed(Object[] xs, Object y)
xs - the array to remove fromy - the object to removepublic static Object[] concatenated(Object[] xs, Object[] ys)
xs - first Arrayys - second Arraypublic static Object[] section(Object[] xs, int start, int limit)
xs - the input Arraystart - the index in the original array to start our section, inclusivelimit - the index in the original array to stop at, inclusivepublic static int indexOf(Object[] xs, Object x)
xs - the Array to searchx - the Object to checkequal objectCopyright © 2000–2021 PanEris. All rights reserved.