1 package jimm.datavision; 2 import jimm.util.Getopts; 3 4 9 public class info { 10 11 public static final int VERSION_MAJOR = 1; 12 public static final int VERSION_MINOR = 0; 13 public static final int VERSION_TWEAK = 0; 14 15 public static final String Version = 16 "" + VERSION_MAJOR + "." + VERSION_MINOR + "." + VERSION_TWEAK; 17 public static final String Copyright = 18 "Copyright (c) 2001-2005 Jim Menard, jimm@io.com"; 19 public static final String URL = "http://datavision.sourceforge.net"; 20 21 29 public static void main(String [] args) { 30 Getopts g = new Getopts("vcun", args); 31 boolean moreThanOne = 32 ((g.hasOption('v') ? 1 : 0) 33 + (g.hasOption('c') ? 1 : 0) 34 + (g.hasOption('u') ? 1 : 0)) > 1; 35 String separator = g.hasOption('n') ? "\n" : " "; 36 37 if (g.hasOption('v')) System.out.print(Version); 38 if (moreThanOne) System.out.print(separator); 39 if (g.hasOption('c')) System.out.print(Copyright); 40 if (moreThanOne) System.out.print(separator); 41 if (g.hasOption('u')) System.out.print(URL); 42 43 if (g.hasOption('n')) System.out.println(); 44 } 45 46 } 47 | Popular Tags |