cpptools
Class Options

java.lang.Object
  extended by cpptools.Options

public class Options
extends java.lang.Object

Implements a simple program options handler.

Author:
Mathieu Champlon

Constructor Summary
Options(java.lang.String[] args)
          Create a program options handler.
 
Method Summary
 java.util.List<java.lang.String> getArgList()
          Retrieve a list of the non-parsable remaining arguments.
 java.util.List<java.lang.String> getOptionProperties(java.lang.String name)
          Retrieve a list of all properties for a given option.
 java.util.List<java.lang.String> getOptionPropertyValues(java.lang.String name)
          Retrieve a list of all property values for a given option.
 java.util.List<java.lang.String> getOptionValues(java.lang.String name)
          Retrieve a list of all values for a given option.
 boolean hasOption(java.lang.String name)
          Test if an option is set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Options

public Options(java.lang.String[] args)
Create a program options handler.

Parameters:
args - program arguments
Method Detail

getArgList

public final java.util.List<java.lang.String> getArgList()
Retrieve a list of the non-parsable remaining arguments.

Returns:
a list of arguments

hasOption

public final boolean hasOption(java.lang.String name)
Test if an option is set.

Parameters:
name - the option
Returns:
whether the option has been set or not

getOptionValues

public final java.util.List<java.lang.String> getOptionValues(java.lang.String name)
Retrieve a list of all values for a given option.

With the option -optionvalue and the name option will return value.

Parameters:
name - the option
Returns:
a list of values

getOptionProperties

public final java.util.List<java.lang.String> getOptionProperties(java.lang.String name)
Retrieve a list of all properties for a given option.

With the option -optionproperty=value and the name option will return property.

Parameters:
name - the option
Returns:
a list of values

getOptionPropertyValues

public final java.util.List<java.lang.String> getOptionPropertyValues(java.lang.String name)
Retrieve a list of all property values for a given option.

With the option -optionproperty=value and the name option will return value.

Parameters:
name - the option
Returns:
a list of values


Copyright © 2006-2007 null. All Rights Reserved.