org.apache.commons.betwixt
Class Options

java.lang.Object
  |
  +--org.apache.commons.betwixt.Options

public class Options
extends java.lang.Object

Collective for Betwixt optional behaviour hints. An option links a name with a value (both strings).

Since:
0.5
Author:
Jakarta Commons Team

Constructor Summary
Options()
           
 
Method Summary
 void addOption(java.lang.String name, java.lang.String value)
          Adds the option.
 java.lang.String[] getNames()
          Gets the names of each option.
 java.lang.String getValue(java.lang.String name)
          Gets the value (if any) associated with the given name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Options

public Options()
Method Detail

getValue

public java.lang.String getValue(java.lang.String name)
Gets the value (if any) associated with the given name.

Parameters:
name - String, not null
Returns:
the associated value, or null if no value is assocated

getNames

public java.lang.String[] getNames()
Gets the names of each option.

Returns:

addOption

public void addOption(java.lang.String name,
                      java.lang.String value)
Adds the option. The rule with options is that the last call to set the value with a given name wins.

Parameters:
name - String name, not null
value - Strong name, not null


Copyright © 2002-2004 The Apache Software Foundation. All Rights Reserved.