X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Futil%2FFormat.java;h=b564706f9442e8c73e6ac9b286b53b51f6ca2aaa;hb=2202f8ba9f000c811358937a571c5cd4a017a403;hp=a78123fd3f95ad29465e20bd5334369c52f9055d;hpb=f24dacb1da56fccf05d684e2f4899facec2aecf7;p=jalview.git diff --git a/src/jalview/util/Format.java b/src/jalview/util/Format.java index a78123f..b564706 100755 --- a/src/jalview/util/Format.java +++ b/src/jalview/util/Format.java @@ -593,80 +593,6 @@ public class Format } /** - * a test stub for the format class - */ - public static void main(String[] a) - { - double x = 1.23456789012; - double y = 123; - double z = 1.2345e30; - double w = 1.02; - double u = 1.234e-5; - int d = 0xCAFE; - Format.print(System.out, "x = |%f|\n", x); - Format.print(System.out, "u = |%20f|\n", u); - Format.print(System.out, "x = |% .5f|\n", x); - Format.print(System.out, "w = |%20.5f|\n", w); - Format.print(System.out, "x = |%020.5f|\n", x); - Format.print(System.out, "x = |%+20.5f|\n", x); - Format.print(System.out, "x = |%+020.5f|\n", x); - Format.print(System.out, "x = |% 020.5f|\n", x); - Format.print(System.out, "y = |%#+20.5f|\n", y); - Format.print(System.out, "y = |%-+20.5f|\n", y); - Format.print(System.out, "z = |%20.5f|\n", z); - - Format.print(System.out, "x = |%e|\n", x); - Format.print(System.out, "u = |%20e|\n", u); - Format.print(System.out, "x = |% .5e|\n", x); - Format.print(System.out, "w = |%20.5e|\n", w); - Format.print(System.out, "x = |%020.5e|\n", x); - Format.print(System.out, "x = |%+20.5e|\n", x); - Format.print(System.out, "x = |%+020.5e|\n", x); - Format.print(System.out, "x = |% 020.5e|\n", x); - Format.print(System.out, "y = |%#+20.5e|\n", y); - Format.print(System.out, "y = |%-+20.5e|\n", y); - - Format.print(System.out, "x = |%g|\n", x); - Format.print(System.out, "z = |%g|\n", z); - Format.print(System.out, "w = |%g|\n", w); - Format.print(System.out, "u = |%g|\n", u); - Format.print(System.out, "y = |%.2g|\n", y); - Format.print(System.out, "y = |%#.2g|\n", y); - - Format.print(System.out, "d = |%d|\n", d); - Format.print(System.out, "d = |%20d|\n", d); - Format.print(System.out, "d = |%020d|\n", d); - Format.print(System.out, "d = |%+20d|\n", d); - Format.print(System.out, "d = |% 020d|\n", d); - Format.print(System.out, "d = |%-20d|\n", d); - Format.print(System.out, "d = |%20.8d|\n", d); - Format.print(System.out, "d = |%x|\n", d); - Format.print(System.out, "d = |%20X|\n", d); - Format.print(System.out, "d = |%#20x|\n", d); - Format.print(System.out, "d = |%020X|\n", d); - Format.print(System.out, "d = |%20.8x|\n", d); - Format.print(System.out, "d = |%o|\n", d); - Format.print(System.out, "d = |%020o|\n", d); - Format.print(System.out, "d = |%#20o|\n", d); - Format.print(System.out, "d = |%#020o|\n", d); - Format.print(System.out, "d = |%20.12o|\n", d); - - Format.print(System.out, "s = |%-20s|\n", "Hello"); - Format.print(System.out, "s = |%-20c|\n", '!'); - - // regression test to confirm fix of reported bugs - Format.print(System.out, "|%i|\n", Long.MIN_VALUE); - - Format.print(System.out, "|%6.2e|\n", 0.0); - Format.print(System.out, "|%6.2g|\n", 0.0); - - Format.print(System.out, "|%6.2f|\n", 9.99); - Format.print(System.out, "|%6.2f|\n", 9.999); - - Format.print(System.out, "|%6.0f|\n", 9.999); - } - - /** * DOCUMENT ME! * * @param c DOCUMENT ME!