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

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

public class CliValueContainerMap
extends AbstractCliValueContainerContainer

This is an implementation of CliValueContainer for a Map.

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

Field Summary
private  Map<Object,Object> map
           
 
Constructor Summary
CliValueContainerMap(CliParameterContainer parameterContainer, CliState cliState, CliParserDependencies dependencies, org.slf4j.Logger logger, Map<Object,Object> value)
          The constructor.
 
Method Summary
 Object getValue()
          This method gets the value of a option or a argument.
protected  void setValueEntry(String entry, GenericType<?> propertyType)
          This method is like AbstractCliValueContainerContainer.setValue(String) but for a single entry.
protected  void setValueInternal(Object containerValue)
          This method sets the container value as new object.
 
Methods inherited from class net.sf.mmm.util.cli.base.AbstractCliValueContainerContainer
isArrayMapOrCollection, setValue, setValueInternal
 
Methods inherited from class net.sf.mmm.util.cli.base.AbstractCliValueContainer
getCliState, getDependencies, getLogger, getParameterContainer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

private Map<Object,Object> map
See Also:
getValue()
Constructor Detail

CliValueContainerMap

public CliValueContainerMap(CliParameterContainer parameterContainer,
                            CliState cliState,
                            CliParserDependencies dependencies,
                            org.slf4j.Logger logger,
                            Map<Object,Object> value)
The constructor.

Parameters:
parameterContainer - is the parameter-container.
cliState - is the state.
dependencies - are the dependencies.
logger - is the logger.
value - is the initial, empty Map-value.
Method Detail

getValue

public Object getValue()
This method gets the value of a option or a argument.

Returns:
the value.

setValueInternal

protected void setValueInternal(Object containerValue)
This method sets the container value as new object.

Specified by:
setValueInternal in class AbstractCliValueContainerContainer
Parameters:
containerValue - is the container value to set.

setValueEntry

protected void setValueEntry(String entry,
                             GenericType<?> propertyType)
This method is like AbstractCliValueContainerContainer.setValue(String) but for a single entry.

Specified by:
setValueEntry in class AbstractCliValueContainerContainer
Parameters:
entry - is a single map-entry in the form "key=value".
propertyType - is the GenericType of the container.
See Also:
CliContainerStyle.MULTIPLE_OCCURRENCE


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