FreeHEP API
Version current

org.freehep.util.argv
Class MultiStringOption

java.lang.Object
  extended byorg.freehep.util.argv.MultiStringOption
All Implemented Interfaces:
Option

public class MultiStringOption
extends Object
implements Option

A Multiple String option for use with ArgumentParser. This allows for multiple occurences of this option with a string (typically -I for compilers). The result is a List of Strings.

Version:
$Id: MultiStringOption.java,v 1.1 2005/01/04 00:45:57 duns Exp $
Author:
Mark Donszelmann
Source Code:
MultiStringOption.java

Constructor Summary
MultiStringOption(String flag, String name, String description)
           
MultiStringOption(String flag, String shortCut, String name, String description)
           
 
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.
 List getValue()
           
 int parse(List values)
          Must check whether values begins with this option.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiStringOption

public MultiStringOption(String flag,
                         String name,
                         String description)

MultiStringOption

public MultiStringOption(String flag,
                         String shortCut,
                         String name,
                         String description)
Method Detail

getValue

public List getValue()

parse

public int parse(List values)
          throws MissingArgumentException
Description copied from interface: Option
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.

Specified by:
parse in interface Option
Throws:
MissingArgumentException

getOption

public String getOption()
Description copied from interface: Option
Must return the flag and parameters of this option.

Specified by:
getOption in interface Option

getUsage

public String getUsage()
Description copied from interface: Option
Must return a description of the usage of this option.

Specified by:
getUsage in interface Option

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.