1 package com.thaiopensource.validate; 2 3 import com.thaiopensource.util.PropertyId; 4 5 public class FlagOption implements Option { 6 private final FlagPropertyId pid; 7 public FlagOption(FlagPropertyId pid) { 8 this.pid = pid; 9 } 10 11 public PropertyId getPropertyId() { 12 return pid; 13 } 14 15 public Object valueOf(String arg) throws OptionArgumentException { 16 if (arg != null) 17 throw new OptionArgumentPresenceException(); 18 return Flag.PRESENT; 19 } 20 21 public Object combine(Object [] values) { 22 return null; 23 } 24 } 25 | Popular Tags |