| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectorg.melati.poem.util.ArrayUtils
public final class ArrayUtils
A collection of useful operations on Arrays.
| Method Summary | |
|---|---|
static Object[] | 
added(Object[] xs,
      Object y)
Add an Object to an Array.  | 
static Object[] | 
arrayOf(Enumeration e)
Create an Array from an Enumeration.  | 
static Object[] | 
arrayOf(Vector 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.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Method Detail | 
|---|
public static Object[] arrayOf(Vector v)
v - the Vector
public static Object[] arrayOf(Enumeration e)
e - the Enumeration
public static Object[] added(Object[] xs,
                             Object y)
xs - the array to add toy - the object to add
public static Object[] removed(Object[] xs,
                               Object y)
xs - the array to remove fromy - the object to remove
public static Object[] concatenated(Object[] xs,
                                    Object[] ys)
xs - first Arrayys - second Array
public 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, inclusive
public static int indexOf(Object[] xs,
                          Object x)
xs - the Array to searchx - the Object to check
equal object
public static boolean contains(Object[] xs,
                               Object x)
xs - the Array to searchx - the Object to check
  | 
 | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||