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

public Class ArrayLiterals

extends Object
Class Inheritance
Annotations
@GwtCompatible
Imports
com.google.common.annotations.GwtCompatible

Factory methods for arrays.
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:

an array of the given sizes
newArrayOfSize
(int
the first size for the array to be created
size0
,
int
the second size for the array to be created
size1
)

public static <T> T[]

Returns:

an array of the given size
newArrayOfSize
(int
the size for the array to be created
size
)

public static boolean[][]

Returns:

an array of the given sizes
newBooleanArrayOfSize
(int
the first size for the array to be created
size0
,
int
the second size for the array to be created
size1
)

public static boolean[]

Returns:

an array of the given size
newBooleanArrayOfSize
(int
the size for the array to be created
size
)

public static byte[][]

Returns:

an array of the given sizes
newByteArrayOfSize
(int
the first size for the array to be created
size0
,
int
the second size for the array to be created
size1
)

public static byte[]

Returns:

an array of the given size
newByteArrayOfSize
(int
the size for the array to be created
size
)

public static char[][]

Returns:

an array of the given sizes
newCharArrayOfSize
(int
the first size for the array to be created
size0
,
int
the second size for the array to be created
size1
)

public static char[]

Returns:

an array of the given size
newCharArrayOfSize
(int
the size for the array to be created
size
)

public static double[][]

Returns:

an array of the given sizes
newDoubleArrayOfSize
(int
the first size for the array to be created
size0
,
int
the second size for the array to be created
size1
)

public static double[]

Returns:

an array of the given size
newDoubleArrayOfSize
(int
the size for the array to be created
size
)

public static float[][]

Returns:

an array of the given sizes
newFloatArrayOfSize
(int
the first size for the array to be created
size0
,
int
the second size for the array to be created
size1
)

public static float[]

Returns:

an array of the given size
newFloatArrayOfSize
(int
the size for the array to be created
size
)

public static int[][]

Returns:

an array of the given sizes
newIntArrayOfSize
(int
the first size for the array to be created
size0
,
int
the second size for the array to be created
size1
)

public static int[]

Returns:

an array of the given size
newIntArrayOfSize
(int
the size for the array to be created
size
)

public static long[][]

Returns:

an array of the given sizes
newLongArrayOfSize
(int
the first size for the array to be created
size0
,
int
the second size for the array to be created
size1
)

public static long[]

Returns:

an array of the given size
newLongArrayOfSize
(int
the size for the array to be created
size
)

public static short[][]

Returns:

an array of the given sizes
newShortArrayOfSize
(int
the first size for the array to be created
size0
,
int
the second size for the array to be created
size1
)

public static short[]

Returns:

an array of the given size
newShortArrayOfSize
(int
the size for the array to be created
size
)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ArrayLiteralsback to summary
public ArrayLiterals()

Method Detail

newArrayOfSizeback to summary
public static <T> T[][] newArrayOfSize(int size0, int size1)
Parameters
size0:int

the first size for the array to be created

size1:int

the second size for the array to be created

Returns:T[][]

an array of the given sizes

Annotations
@Pure
@Inline:new $4[$1][$2]
Since
2.16
newArrayOfSizeback to summary
public static <T> T[] newArrayOfSize(int size)
Parameters
size:int

the size for the array to be created

Returns:T[]

an array of the given size

Annotations
@Pure
@Inline:new $3[$1]
Since
2.4
newBooleanArrayOfSizeback to summary
public static boolean[][] newBooleanArrayOfSize(int size0, int size1)
Parameters
size0:int

the first size for the array to be created

size1:int

the second size for the array to be created

Returns:boolean[][]

an array of the given sizes

Annotations
@Pure
@Inline:new boolean[$1][$2]
Since
2.16
newBooleanArrayOfSizeback to summary
public static boolean[] newBooleanArrayOfSize(int size)
Parameters
size:int

the size for the array to be created

Returns:boolean[]

an array of the given size

Annotations
@Pure
@Inline:new boolean[$1]
Since
2.4
newByteArrayOfSizeback to summary
public static byte[][] newByteArrayOfSize(int size0, int size1)
Parameters
size0:int

the first size for the array to be created

size1:int

the second size for the array to be created

Returns:byte[][]

an array of the given sizes

Annotations
@Pure
@Inline:new byte[$1][$2]
Since
2.16
newByteArrayOfSizeback to summary
public static byte[] newByteArrayOfSize(int size)
Parameters
size:int

the size for the array to be created

Returns:byte[]

an array of the given size

Annotations
@Pure
@Inline:new byte[$1]
Since
2.4
newCharArrayOfSizeback to summary
public static char[][] newCharArrayOfSize(int size0, int size1)
Parameters
size0:int

the first size for the array to be created

size1:int

the second size for the array to be created

Returns:char[][]

an array of the given sizes

Annotations
@Pure
@Inline:new char[$1][$2]
Since
2.16
newCharArrayOfSizeback to summary
public static char[] newCharArrayOfSize(int size)
Parameters
size:int

the size for the array to be created

Returns:char[]

an array of the given size

Annotations
@Pure
@Inline:new char[$1]
Since
2.4
newDoubleArrayOfSizeback to summary
public static double[][] newDoubleArrayOfSize(int size0, int size1)
Parameters
size0:int

the first size for the array to be created

size1:int

the second size for the array to be created

Returns:double[][]

an array of the given sizes

Annotations
@Pure
@Inline:new double[$1][$2]
Since
2.16
newDoubleArrayOfSizeback to summary
public static double[] newDoubleArrayOfSize(int size)
Parameters
size:int

the size for the array to be created

Returns:double[]

an array of the given size

Annotations
@Pure
@Inline:new double[$1]
Since
2.4
newFloatArrayOfSizeback to summary
public static float[][] newFloatArrayOfSize(int size0, int size1)
Parameters
size0:int

the first size for the array to be created

size1:int

the second size for the array to be created

Returns:float[][]

an array of the given sizes

Annotations
@Pure
@Inline:new float[$1][$2]
Since
2.16
newFloatArrayOfSizeback to summary
public static float[] newFloatArrayOfSize(int size)
Parameters
size:int

the size for the array to be created

Returns:float[]

an array of the given size

Annotations
@Pure
@Inline:new float[$1]
Since
2.4
newIntArrayOfSizeback to summary
public static int[][] newIntArrayOfSize(int size0, int size1)
Parameters
size0:int

the first size for the array to be created

size1:int

the second size for the array to be created

Returns:int[][]

an array of the given sizes

Annotations
@Pure
@Inline:new int[$1][$2]
Since
2.16
newIntArrayOfSizeback to summary
public static int[] newIntArrayOfSize(int size)
Parameters
size:int

the size for the array to be created

Returns:int[]

an array of the given size

Annotations
@Pure
@Inline:new int[$1]
Since
2.4
newLongArrayOfSizeback to summary
public static long[][] newLongArrayOfSize(int size0, int size1)
Parameters
size0:int

the first size for the array to be created

size1:int

the second size for the array to be created

Returns:long[][]

an array of the given sizes

Annotations
@Pure
@Inline:new long[$1][$2]
Since
2.16
newLongArrayOfSizeback to summary
public static long[] newLongArrayOfSize(int size)
Parameters
size:int

the size for the array to be created

Returns:long[]

an array of the given size

Annotations
@Pure
@Inline:new long[$1]
Since
2.4
newShortArrayOfSizeback to summary
public static short[][] newShortArrayOfSize(int size0, int size1)
Parameters
size0:int

the first size for the array to be created

size1:int

the second size for the array to be created

Returns:short[][]

an array of the given sizes

Annotations
@Pure
@Inline:new short[$1][$2]
Since
2.16
newShortArrayOfSizeback to summary
public static short[] newShortArrayOfSize(int size)
Parameters
size:int

the size for the array to be created

Returns:short[]

an array of the given size

Annotations
@Pure
@Inline:new short[$1]
Since
2.4