org.freehep.util.argv
Interface Option

All Known Implementing Classes:
BooleanOption, DoubleOption, IntOption, MultiStringOption, NumberOption, PairOption, StringOption

public interface Option

Interface for options that may be registered and parsed by the ArgumentParser.


Method Summary
 String getOption()
          Must return the flag and parameters of this option.
 String getUsage()
          Must return a description of the usage of this option.
 int parse(List values)
          Must check whether values begins with this option.
 

Method Detail

parse

int parse(List values)
          throws MissingArgumentException,
                 ArgumentFormatException,
                 BailOutException
Must check whether values begins with this option. If it does, this method must return number of arguments belonging to this option. Otherwise, it must return 0. ArgumentParser.parse( values ) will invoke this method once for each possible starting position of this option in values.

Throws:
MissingArgumentException
ArgumentFormatException
BailOutException

getOption

String getOption()
Must return the flag and parameters of this option.


getUsage

String getUsage()
Must return a description of the usage of this option.



Copyright © 2000-2007 FreeHEP. All Rights Reserved.