net.sf.mmm.util.cli.base
Class CliValueContainerObject

java.lang.Object
  extended by net.sf.mmm.util.cli.base.AbstractCliValueContainer
      extended by net.sf.mmm.util.cli.base.CliValueContainerObject
All Implemented Interfaces:
CliValueContainer

public class CliValueContainerObject
extends AbstractCliValueContainer

This is an implementation of CliValueContainer for simple objects (no arrays, collections, maps).

Since:
2.0.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Field Summary
private  Object value
           
 
Constructor Summary
CliValueContainerObject(CliParameterContainer parameterContainer, CliState cliState, CliParserDependencies dependencies, org.slf4j.Logger logger)
          The constructor.
 
Method Summary
 Object getValue()
          This method gets the value of a option or a argument.
 void setValue(String argument)
          This method sets the value given as string.
 
Methods inherited from class net.sf.mmm.util.cli.base.AbstractCliValueContainer
getCliState, getDependencies, getLogger, getParameterContainer, isArrayMapOrCollection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

private Object value
See Also:
getValue()
Constructor Detail

CliValueContainerObject

public CliValueContainerObject(CliParameterContainer parameterContainer,
                               CliState cliState,
                               CliParserDependencies dependencies,
                               org.slf4j.Logger logger)
The constructor.

Parameters:
parameterContainer - is the parameter-container.
cliState - is the state.
dependencies - are the dependencies.
logger - is the logger.
Method Detail

getValue

public Object getValue()
Description copied from interface: CliValueContainer
This method gets the value of a option or a argument.

Returns:
the value

setValue

public void setValue(String argument)
This method sets the value given as string. For the parameter-types array, collection or map this method may be called multiple times, one for each item.

Parameters:
argument - is the argument from the commandline containing the value.


Copyright © 2001-2010 mmm-Team. All Rights Reserved.