Class ArrayLiterals


  • @GwtCompatible
    public class ArrayLiterals
    extends java.lang.Object
    Factory methods for arrays.
    Since:
    2.4
    • Constructor Detail

      • ArrayLiterals

        public ArrayLiterals()
    • Method Detail

      • newArrayOfSize

        @Pure
        public static <T> T[][] newArrayOfSize​(int size0,
                                               int size1)
        Parameters:
        size0 - the first size for the array to be created
        size1 - the second size for the array to be created
        Returns:
        an array of the given sizes
        Since:
        2.16
      • 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 size0,
                                                  int size1)
        Parameters:
        size0 - the first size for the array to be created
        size1 - the second size for the array to be created
        Returns:
        an array of the given sizes
        Since:
        2.16
      • 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 size0,
                                                int size1)
        Parameters:
        size0 - the first size for the array to be created
        size1 - the second size for the array to be created
        Returns:
        an array of the given sizes
        Since:
        2.16
      • 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 size0,
                                                        int size1)
        Parameters:
        size0 - the first size for the array to be created
        size1 - the second size for the array to be created
        Returns:
        an array of the given sizes
        Since:
        2.16
      • 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 size0,
                                                    int size1)
        Parameters:
        size0 - the first size for the array to be created
        size1 - the second size for the array to be created
        Returns:
        an array of the given sizes
        Since:
        2.16
      • 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 size0,
                                                  int size1)
        Parameters:
        size0 - the first size for the array to be created
        size1 - the second size for the array to be created
        Returns:
        an array of the given sizes
        Since:
        2.16
      • 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 size0,
                                                    int size1)
        Parameters:
        size0 - the first size for the array to be created
        size1 - the second size for the array to be created
        Returns:
        an array of the given sizes
        Since:
        2.16
      • 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 size0,
                                                      int size1)
        Parameters:
        size0 - the first size for the array to be created
        size1 - the second size for the array to be created
        Returns:
        an array of the given sizes
        Since:
        2.16
      • 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 size0,
                                                  int size1)
        Parameters:
        size0 - the first size for the array to be created
        size1 - the second size for the array to be created
        Returns:
        an array of the given sizes
        Since:
        2.16
      • 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