snaq.util.jclap
Class DateOption

java.lang.Object
  extended by snaq.util.jclap.Option<java.util.Date>
      extended by snaq.util.jclap.DateOption

public class DateOption
extends Option<java.util.Date>

Option implementation for specifying date values.

Author:
Giles Winstanley

Constructor Summary
DateOption(java.lang.String shortName, java.lang.String longName, java.lang.String description, boolean requiresValue, boolean mandatory, boolean allowMany)
           
DateOption(java.lang.String shortName, java.lang.String longName, java.lang.String description, boolean requiresValue, int minCount, int maxCount)
           
 
Method Summary
 java.text.DateFormat getDateFormat()
           
 java.lang.Class<java.util.Date> getType()
          Returns the class type of value this option can take.
static void main(java.lang.String[] args)
           
 
Methods inherited from class snaq.util.jclap.Option
equals, getDescription, getLongName, getMaxCount, getMinCount, getShortName, getValues, hashCode, isAllowMany, isHidden, isMandatory, requiresValue, setHidden, setMinMaxCounts, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DateOption

public DateOption(java.lang.String shortName,
                  java.lang.String longName,
                  java.lang.String description,
                  boolean requiresValue,
                  boolean mandatory,
                  boolean allowMany)

DateOption

public DateOption(java.lang.String shortName,
                  java.lang.String longName,
                  java.lang.String description,
                  boolean requiresValue,
                  int minCount,
                  int maxCount)
Method Detail

getType

public java.lang.Class<java.util.Date> getType()
Description copied from class: Option
Returns the class type of value this option can take.

Specified by:
getType in class Option<java.util.Date>

getDateFormat

public java.text.DateFormat getDateFormat()
Returns:
The DateFormat instance used to parse dates.

main

public static void main(java.lang.String[] args)
                 throws OptionException
Throws:
OptionException