001 package com.thaiopensource.validate;
002
003 import com.thaiopensource.util.PropertyId;
004
005 public interface Option {
006 PropertyId getPropertyId();
007 Object valueOf(String arg) throws OptionArgumentException;
008 /**
009 * Combines multiple values of an option into a single value. A property
010 * whose value is logically a sequence may be represented by multiple options
011 * each representing a single member of the sequence.
012 *
013 * @param values an array of values to be combined
014 * @return an Object representing the combination, or <code>null</code>
015 * if they cannot be combined
016 */
017 Object combine(Object[] values);
018 }