Top Description Constructors Methods
org.eclipse.xtext.xbase.lib

public Class ArrayExtensions

extends Object
Class Inheritance
Annotations
@GwtCompatible
Imports
java.util.Objects, com.google.common.annotations.GwtCompatible, .GwtIncompatible

An extension library for arrays, to be used with Xtend. It allows to use an array without converting it to a list first.
Authors
Sven Efftinge - Initial contribution and API, Stephane Galland - Add operations on 2-dimension arrays.
Since
2.4

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static <T> T[]

Returns:

the cloned array
clone
(T[]
the array
array
)

Clones the array.

public static boolean[]

Returns:

the cloned array
clone
(boolean[]
the array
array
)

Clones the array.

public static double[]

Returns:

the cloned array
clone
(double[]
the array
array
)

Clones the array.

public static float[]

Returns:

the cloned array
clone
(float[]
the array
array
)

Clones the array.

public static long[]

Returns:

the cloned array
clone
(long[]
the array
array
)

Clones the array.

public static int[]

Returns:

the cloned array
clone
(int[]
the array
array
)

Clones the array.

public static char[]

Returns:

the cloned array
clone
(char[]
the array
array
)

Clones the array.

public static short[]

Returns:

the cloned array
clone
(short[]
the array
array
)

Clones the array.

public static byte[]

Returns:

the cloned array
clone
(byte[]
the array
array
)

Clones the array.

public static boolean

Returns:

true if this array contains the specified element
contains
(Object[]
the array to test
array
,
Object
element whose presence in this array is to be tested
o
)

Returns whether the array contains the given element.

public static boolean

Returns:

true if this array contains the specified element
contains
(boolean[]
the array to test
array
,
boolean
value whose presence in this array is to be tested
value
)

Returns whether the array contains the given value.

public static boolean

Returns:

true if this array contains the specified element
contains
(double[]
the array to test
array
,
double
value whose presence in this array is to be tested
value
)

Returns whether the array contains the given value.

public static boolean

Returns:

true if this array contains the specified element
contains
(float[]
the array to test
array
,
float
value whose presence in this array is to be tested
value
)

Returns whether the array contains the given value.

public static boolean

Returns:

true if this array contains the specified element
contains
(long[]
the array to test
array
,
long
element whose presence in this array is to be tested
value
)

Returns whether the array contains the given value.

public static boolean

Returns:

true if this array contains the specified element
contains
(int[]
the array to test
array
,
int
value whose presence in this array is to be tested
value
)

Returns whether the array contains the given value.

public static boolean

Returns:

true if this array contains the specified element
contains
(char[]
the array to test
array
,
char
value whose presence in this array is to be tested
value
)

Returns whether the array contains the given value.

public static boolean

Returns:

true if this array contains the specified element
contains
(short[]
the array to test
array
,
short
value whose presence in this array is to be tested
value
)

Returns whether the array contains the given value.

public static boolean

Returns:

true if this array contains the specified element
contains
(byte[]
the array to test
array
,
byte
value whose presence in this array is to be tested
value
)

Returns whether the array contains the given value.

public static boolean

Returns:

whether the two given argument are identical
equals
(Object[]
the array
array
,
Object
the other element to compare to
other
)

Returns whether the array and the given other object are identical.

public static boolean

Returns:

whether the two given argument are identical
equals
(boolean[]
the array
array
,
Object
the other element to compare to
other
)

Returns whether the array and the given other object are identical.

public static boolean

Returns:

whether the two given argument are identical
equals
(double[]
the array
array
,
Object
the other element to compare to
other
)

Returns whether the array and the given other object are identical.

public static boolean

Returns:

whether the two given argument are identical
equals
(float[]
the array
array
,
Object
the other element to compare to
other
)

Returns whether the array and the given other object are identical.

public static boolean

Returns:

whether the two given argument are identical
equals
(long[]
the array
array
,
Object
the other element to compare to
other
)

Returns whether the array and the given other object are identical.

public static boolean

Returns:

whether the two given argument are identical
equals
(int[]
the array
array
,
Object
the other element to compare to
other
)

Returns whether the array and the given other object are identical.

public static boolean

Returns:

whether the two given argument are identical
equals
(char[]
the array
array
,
Object
the other element to compare to
other
)

Returns whether the array and the given other object are identical.

public static boolean

Returns:

whether the two given argument are identical
equals
(short[]
the array
array
,
Object
the other element to compare to
other
)

Returns whether the array and the given other object are identical.

public static boolean

Returns:

whether the two given argument are identical
equals
(byte[]
the array
array
,
Object
the other element to compare to
other
)

Returns whether the array and the given other object are identical.

public static <T> T

Returns:

the value at the given index
get
(T[]
the array
array
,
int
the index
index
)

public static boolean

Returns:

the value at the given index
get
(boolean[]
the array
array
,
int
the index
index
)

public static double

Returns:

the value at the given index
get
(double[]
the array
array
,
int
the index
index
)

public static float

Returns:

the value at the given index
get
(float[]
the array
array
,
int
the index
index
)

public static long

Returns:

the value at the given index
get
(long[]
the array
array
,
int
the index
index
)

public static int

Returns:

the value at the given index
get
(int[]
the array
array
,
int
the index
index
)

public static char

Returns:

the value at the given index
get
(char[]
the array
array
,
int
the index
index
)

public static short

Returns:

the value at the given index
get
(short[]
the array
array
,
int
the index
index
)

public static byte

Returns:

the value at the given index
get
(byte[]
the array
array
,
int
the index
index
)

public static <T> T

Returns:

the value at the given index
get
(T[][]
the array
array
,
int
the first index
index0
,
int
the second index
index1
)

public static boolean

Returns:

the value at the given indexes
get
(boolean[][]
the array
array
,
int
the first index
index0
,
int
the second index
index1
)

public static double

Returns:

the value at the given indexes
get
(double[][]
the array
array
,
int
the first index
index0
,
int
the second index
index1
)

public static float

Returns:

the value at the given indexes
get
(float[][]
the array
array
,
int
the first index
index0
,
int
the first index
index1
)

public static long

Returns:

the value at the given indexes
get
(long[][]
the array
array
,
int
the first index
index0
,
int
the second index
index1
)

public static int

Returns:

the value at the given indexes
get
(int[][]
the array
array
,
int
the first index
index0
,
int
the second index
index1
)

public static char

Returns:

the value at the given indexes
get
(char[][]
the array
array
,
int
the first index
index0
,
int
the second index
index1
)

public static short

Returns:

the value at the given indexes
get
(short[][]
the array
array
,
int
the first index
index0
,
int
the second index
index1
)

public static byte

Returns:

the value at the given indexes
get
(byte[][]
the array
array
,
int
the first index
index0
,
int
the second index
index1
)

public static int

Returns:

the hash code
hashCode
(Object[]
the array
array
)

Returns a hash code value for the given array.

public static int

Returns:

the hash code
hashCode
(boolean[]
the array
array
)

Returns a hash code value for the given array.

public static int

Returns:

the hash code
hashCode
(double[]
the array
array
)

Returns a hash code value for the given array.

public static int

Returns:

the hash code
hashCode
(float[]
the array
array
)

Returns a hash code value for the given array.

public static int

Returns:

the hash code
hashCode
(long[]
the array
array
)

Returns a hash code value for the given array.

public static int

Returns:

the hash code
hashCode
(int[]
the array
array
)

Returns a hash code value for the given array.

public static int

Returns:

the hash code
hashCode
(char[]
the array
array
)

Returns a hash code value for the given array.

public static int

Returns:

the hash code
hashCode
(short[]
the array
array
)

Returns a hash code value for the given array.

public static int

Returns:

the hash code
hashCode
(byte[]
the array
array
)

Returns a hash code value for the given array.

public static int

Returns:

the length of the given array
length
(Object[]
the array
array
)

public static int

Returns:

the length of the given array
length
(boolean[]
the array
array
)

public static int

Returns:

the length of the given array
length
(double[]
the array
array
)

public static int

Returns:

the length of the given array
length
(float[]
the array
array
)

public static int

Returns:

the length of the given array
length
(long[]
the array
array
)

public static int

Returns:

the length of the given array
length
(int[]
the array
array
)

public static int

Returns:

the length of the given array
length
(char[]
the array
array
)

public static int

Returns:

the length of the given array
length
(short[]
the array
array
)

public static int

Returns:

the length of the given array
length
(byte[]
the array
array
)

public static <T, E extends T> T

Returns:

the new value
set
(T[]
the array
array
,
int
the index the value should be set at
index
,
E
the value to set at the given index
value
)

public static boolean

Returns:

the new value
set
(boolean[]
the array
array
,
int
the index the value should be set at
index
,
boolean
the value to set at the given index
value
)

public static double

Returns:

the new value
set
(double[]
the array
array
,
int
the index the value should be set at
index
,
double
the value to set at the given index
value
)

public static float

Returns:

the new value
set
(float[]
the array
array
,
int
the index the value should be set at
index
,
float
the value to set at the given index
value
)

public static long

Returns:

the new value
set
(long[]
the array
array
,
int
the index the value should be set at
index
,
long
the value to set at the given index
value
)

public static int

Returns:

the new value
set
(int[]
the array
array
,
int
the index the value should be set at
index
,
int
the value to set at the given index
value
)

public static char

Returns:

the new value
set
(char[]
the array
array
,
int
the index the value should be set at
index
,
char
the value to set at the given index
value
)

public static short

Returns:

the new value
set
(short[]
the array
array
,
int
the index the value should be set at
index
,
short
the value to set at the given index
value
)

public static byte

Returns:

the new value
set
(byte[]
the array
array
,
int
the index the value should be set at
index
,
byte
the value to set at the given index
value
)

public static <T, E extends T> T

Returns:

the new value
set
(T[][]
the array
array
,
int
the first index the value should be set at
index0
,
int
the second index the value should be set at
index1
,
E
the value to set at the given indexes
value
)

public static boolean

Returns:

the new value
set
(boolean[][]
the array
array
,
int
the first index the value should be set at
index0
,
int
the second index the value should be set at
index1
,
boolean
the value to set at the given indexes
value
)

public static double

Returns:

the new value
set
(double[][]
the array
array
,
int
the first index the value should be set at
index0
,
int
the second index the value should be set at
index1
,
double
the value to set at the given indexex
value
)

public static float

Returns:

the new value
set
(float[][]
the array
array
,
int
the first index the value should be set at
index0
,
int
the second index the value should be set at
index1
,
float
the value to set at the given indexes
value
)

public static long

Returns:

the new value
set
(long[][]
the array
array
,
int
the first index the value should be set at
index0
,
int
the second index the value should be set at
index1
,
long
the value to set at the given indexes
value
)

public static int

Returns:

the new value
set
(int[][]
the array
array
,
int
the first index the value should be set at
index0
,
int
the second index the value should be set at
index1
,
int
the value to set at the given index
value
)

public static char

Returns:

the new value
set
(char[][]
the array
array
,
int
the first index the value should be set at
index0
,
int
the second index the value should be set at
index1
,
char
the value to set at the given indexes
value
)

public static short

Returns:

the new value
set
(short[][]
the array
array
,
int
the first index the value should be set at
index0
,
int
the second index the value should be set at
index1
,
short
the value to set at the given indexes
value
)

public static byte

Returns:

the new value
set
(byte[][]
the array
array
,
int
the first index the value should be set at
index0
,
int
the second index the value should be set at
index1
,
byte
the value to set at the given indexes
value
)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait