org.eclipse.xtext.xbase.lib
Class ArrayLiterals

java.lang.Object
  extended by org.eclipse.xtext.xbase.lib.ArrayLiterals

public class ArrayLiterals
extends Object

Factory methods for arrays.

Since:
2.4
Author:
Sven Efftinge - Initial contribution and API

Constructor Summary
ArrayLiterals()
           
 
Method Summary
static
<T> T[]
newArrayOfSize(int size)
           
static boolean[] newBooleanArrayOfSize(int size)
           
static byte[] newByteArrayOfSize(int size)
           
static char[] newCharArrayOfSize(int size)
           
static double[] newDoubleArrayOfSize(int size)
           
static float[] newFloatArrayOfSize(int size)
           
static int[] newIntArrayOfSize(int size)
           
static long[] newLongArrayOfSize(int size)
           
static short[] newShortArrayOfSize(int size)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayLiterals

public ArrayLiterals()
Method Detail

newArrayOfSize

@Pure
public static <T> T[] newArrayOfSize(int size)
Parameters:
size - the size for the array to be created
Returns:
an array of the given size
Since:
2.4

newCharArrayOfSize

@Pure
public static char[] newCharArrayOfSize(int size)
Parameters:
size - the size for the array to be created
Returns:
an array of the given size
Since:
2.4

newIntArrayOfSize

@Pure
public static int[] newIntArrayOfSize(int size)
Parameters:
size - the size for the array to be created
Returns:
an array of the given size
Since:
2.4

newBooleanArrayOfSize

@Pure
public static boolean[] newBooleanArrayOfSize(int size)
Parameters:
size - the size for the array to be created
Returns:
an array of the given size
Since:
2.4

newShortArrayOfSize

@Pure
public static short[] newShortArrayOfSize(int size)
Parameters:
size - the size for the array to be created
Returns:
an array of the given size
Since:
2.4

newLongArrayOfSize

@Pure
public static long[] newLongArrayOfSize(int size)
Parameters:
size - the size for the array to be created
Returns:
an array of the given size
Since:
2.4

newFloatArrayOfSize

@Pure
public static float[] newFloatArrayOfSize(int size)
Parameters:
size - the size for the array to be created
Returns:
an array of the given size
Since:
2.4

newDoubleArrayOfSize

@Pure
public static double[] newDoubleArrayOfSize(int size)
Parameters:
size - the size for the array to be created
Returns:
an array of the given size
Since:
2.4

newByteArrayOfSize

@Pure
public static byte[] newByteArrayOfSize(int size)
Parameters:
size - the size for the array to be created
Returns:
an array of the given size
Since:
2.4


Copyright © 2013. All Rights Reserved.