net.sf.mmm.util.cli.base
Class CliValueContainerCollection
java.lang.Object
net.sf.mmm.util.cli.base.AbstractCliValueContainer
net.sf.mmm.util.cli.base.AbstractCliValueContainerContainer
net.sf.mmm.util.cli.base.CliValueContainerCollection
- All Implemented Interfaces:
- CliValueContainer
- Direct Known Subclasses:
- CliValueContainerArray
public class CliValueContainerCollection
- extends AbstractCliValueContainerContainer
This is an implementation of CliValueContainer for a
Collection.
- Since:
- 2.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
collection
private Collection<Object> collection
- See Also:
getValue()
CliValueContainerCollection
public CliValueContainerCollection(CliParameterContainer parameterContainer,
CliState cliState,
CliParserDependencies dependencies,
org.slf4j.Logger logger,
Collection<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 Collection-value.
getValue
public Object getValue()
- This method gets the value of a
option or a argument.
- Returns:
- the value.
getCollection
public Collection<Object> getCollection()
- Returns:
- the collection
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 collection-entry given as string.propertyType - is the GenericType of the container.- See Also:
CliContainerStyle.MULTIPLE_OCCURRENCE
Copyright © 2001-2010 mmm-Team. All Rights Reserved.