1 19 package org.netbeans.lib.cvsclient.command; 20 21 24 public final class KeywordSubstitutionOptions { 25 26 public static final KeywordSubstitutionOptions DEFAULT = new KeywordSubstitutionOptions("kv"); public static final KeywordSubstitutionOptions DEFAULT_LOCKER = new KeywordSubstitutionOptions("kvl"); public static final KeywordSubstitutionOptions ONLY_KEYWORDS = new KeywordSubstitutionOptions("k"); public static final KeywordSubstitutionOptions ONLY_VALUES = new KeywordSubstitutionOptions("v"); public static final KeywordSubstitutionOptions OLD_VALUES = new KeywordSubstitutionOptions("o"); public static final KeywordSubstitutionOptions BINARY = new KeywordSubstitutionOptions("b"); 33 public static KeywordSubstitutionOptions findKeywordSubstOption(String keyword) { 34 if (BINARY.toString().equals(keyword)) { 35 return BINARY; 36 } 37 if (DEFAULT.toString().equals(keyword)) { 38 return DEFAULT; 39 } 40 if (DEFAULT_LOCKER.toString().equals(keyword)) { 41 return DEFAULT_LOCKER; 42 } 43 if (OLD_VALUES.toString().equals(keyword)) { 44 return OLD_VALUES; 45 } 46 if (ONLY_KEYWORDS.toString().equals(keyword)) { 47 return ONLY_KEYWORDS; 48 } 49 if (ONLY_VALUES.toString().equals(keyword)) { 50 return ONLY_VALUES; 51 } 52 return null; 53 } 54 55 private String value; 56 57 private KeywordSubstitutionOptions(String value) { 58 this.value = value; 59 } 60 61 public String toString() { 62 return value; 63 } 64 } | Popular Tags |