1 19 package org.netbeans.lib.cvsclient.command; 20 21 22 26 public class Watch { 27 public static final Watch EDIT = new Watch("edit", "E", new String []{"edit"}); 30 public static final Watch UNEDIT = new Watch("unedit", "U", new String []{"unedit"}); 33 public static final Watch COMMIT = new Watch("commit", "C", new String []{"commit"}); 36 public static final Watch ALL = new Watch("all", "EUC", new String []{"edit", "unedit", "commit"}); 39 public static final Watch NONE = new Watch("none", "", new String [0]); 41 42 45 public static String getWatchString(Watch watch) { 46 if (watch == null) { 47 return NONE.getValue(); 48 } 49 return watch.getValue(); 50 } 51 52 private final String name; 53 private final String value; 54 private final String [] arguments; 55 56 private Watch(String name, String value, String [] arguments) { 57 this.name = name; 58 this.value = value; 59 this.arguments = arguments; 60 } 61 62 public String [] getArguments() { 63 return arguments; 64 } 65 66 public String toString() { 67 return name; 68 } 69 70 private String getValue() { 71 return value; 72 } 73 } 74 | Popular Tags |