Code example for PrintStream

Methods: formatprintprintln

0
 
        void print1(PrintStream out, boolean bigMarking) {
            switch (histRelevance) {
            case -4: 
                if (bigMarking) {
                    out.println();
                    out.println("*** *** *** *** *** ATTENTION *** *** *** *** ***");
                    out.println("*** *** *** *** *** ATTENTION *** *** *** *** ***");
                    out.println("*** *** *** *** *** ATTENTION *** *** *** *** ***");
                    out.println("Test ran SUCCESSFULLY once, but NOT this time!!!!");
                    out.println("*** *** *** *** *** ATTENTION *** *** *** *** ***");
                    out.println("*** *** *** *** *** ATTENTION *** *** *** *** ***");
                    out.println("*** *** *** *** *** ATTENTION *** *** *** *** ***");
                } 
                out.print("-4 VBAD"); break;
            case 4: out.print(" 4 Good"); break;
            case 3: out.print(" 3 good"); break;
            case -2: out.print("-2 SLOW"); break;
            case 2: out.print(" 2 Fast"); break;
            case 1: out.print(" 1 fast"); break;
            case -3: 
                if (res == -2) out.print("-3 FAIL");
                else out.print("-3 ERR ");
                break; 
            default: 
                if (res == 0) out.print("       ");
                else if (res == -2) out.print("   fail");
                else out.print("   err ");
            } 
            if (isTransition) out.print("! ");
            else out.print("  ");
            out.print(test.toString());
            out.format(": %d# %d(%d) [%d..%d] %.1f ms",
                    statCount, duration, lastDuration,
                    statMinDuration, statMaxDuration, statAvgDuration);
            out.println();
            printed = true;
        } 
 
        void print2(PrintStream out, boolean bigMarking) {
            out.format("%5d. ", id);
Connect your IDE to all the code out there  Get Codota for Java