FreeHEP API
Version current

org.freehep.util.argv
Interface Option

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

public interface Option

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

Source Code:
Option.java

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

public 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

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


getUsage

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


FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.