public class ArrayUtilities
extends java.lang.Object
| Constructor and Description |
|---|
ArrayUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static int[] |
concatenate(int[] a,
int[] b)
Returns a new array containing the elements of a followed by the elements
of b.
|
static <X> X[] |
concatenate(X[] a,
X[] b)
Returns a new array containing the elements of a followed by the elements
of b.
|
static <X> boolean |
contains(X[] a,
X b)
Returns whether a contains b.
|
static <X extends java.lang.Comparable<X>> |
difference(X[] a,
X[] b)
Returns a new array containing all elements in a but not in b.
|
static <X> X[] |
findArrayWith(X[][] a,
X b)
Returns the first array within a in which b occurs, or null if b does not
occur anywhere.
|
static <X> java.util.Set<X> |
toSet(X[] a)
Returns a set containing the elements of the array
|
public static <X> java.util.Set<X> toSet(X[] a)
a - public static <X> X[] concatenate(X[] a,
X[] b)
a - b - public static int[] concatenate(int[] a,
int[] b)
a - b - public static <X> boolean contains(X[] a,
X b)
xs - x - public static <X extends java.lang.Comparable<X>> X[] difference(X[] a,
X[] b)
a - b - public static <X> X[] findArrayWith(X[][] a,
X b)
a - b -