001 package com.thaiopensource.validate; 002 003 import com.thaiopensource.util.PropertyId; 004 005 public class FlagOption implements Option { 006 private final FlagPropertyId pid; 007 public FlagOption(FlagPropertyId pid) { 008 this.pid = pid; 009 } 010 011 public PropertyId getPropertyId() { 012 return pid; 013 } 014 015 public Object valueOf(String arg) throws OptionArgumentException { 016 if (arg != null) 017 throw new OptionArgumentPresenceException(); 018 return Flag.PRESENT; 019 } 020 021 public Object combine(Object[] values) { 022 return null; 023 } 024 }