Java Array Dump dumpGroups(String title, int[][] allGroups)

Here you can find the source of dumpGroups(String title, int[][] allGroups)

Description

Dumps the given groups to the console.

License

Open Source License

Parameter

Parameter Description
title a string title for the dump
allGroups a two-dimensional array with all groups

Declaration

private static void dumpGroups(String title, int[][] allGroups) 

Method Source Code

//package com.java2s;

public class Main {
    /**/*from  w ww.java2 s.c om*/
     * Dumps the given groups to the console.
     *
     * @param title       a string title for the dump
     * @param allGroups   a two-dimensional array with all groups
     */
    private static void dumpGroups(String title, int[][] allGroups) {
        System.out.print(title + " {");
        for (int group = 0; group < allGroups.length; group++) {
            int[] groupIndices = allGroups[group];
            System.out.print(" {");
            for (int i = 0; i < groupIndices.length; i++) {
                System.out.print(groupIndices[i]);
                if (i < groupIndices.length - 1) {
                    System.out.print(", ");
                }
            }
            System.out.print("} ");
            if (group < allGroups.length - 1) {
                System.out.print(", ");
            }
        }
        System.out.println("}");
    }
}

Related

  1. dumpAsHex(byte[] byteBuffer, int length)
  2. dumpAsHex(byte[] src, int length)
  3. dumpCharCharArray(String msg, char[][] o)
  4. dumpData(byte data[])
  5. dumpFirst1024Byte(byte[] data)
  6. dumpHex(byte[] data, int offset, int length)
  7. dumpHexString(final byte[] array)
  8. dumpInt(String name, int[] src)
  9. dumpIntArray(int[] A, int n)