Class Chunk


  • public class Chunk
    extends Object
    Creates an array of elements split into groups the length of size. If array can't be split evenly, the final chunk will be the remaining elements.

    source

    Author:
    Huauauaa
    • Constructor Detail

      • Chunk

        public Chunk()
    • Method Detail

      • chunk

        public static int[][] chunk​(int[] array,
                                    int size)
        Parameters:
        array - : The array to process.
        size - : The length of each chunk.
        Returns:
        the new array of chunks.
      • chunk

        public static int[][] chunk​(int[] array)
        default value 1