com.arsdigita.util.parameter
Class MapParameter
java.lang.Object
com.arsdigita.util.parameter.AbstractParameter
com.arsdigita.util.parameter.MapParameter
- All Implemented Interfaces:
- Parameter
- public class MapParameter
- extends AbstractParameter
Subject to change.
A parameter that manages a collection of Parameter
to
Object
value mappings.
- Version:
- $Id: //core-platform/dev/src/com/arsdigita/util/parameter/MapParameter.java#5 $
- Author:
- Justin Ross <jross@redhat.com>
- See Also:
Map
,
Parameter
Methods inherited from class com.arsdigita.util.parameter.AbstractParameter |
getDefaultValue, getInfo, getName, isRequired, marshal, read, setInfo, toString, unmarshal, validate, write |
versionId
public static final String versionId
- See Also:
- Constant Field Values
MapParameter
public MapParameter(String name,
int multiplicity,
Object defaalt)
MapParameter
public MapParameter(String name)
add
public final void add(Parameter param)
contains
public final boolean contains(Parameter param)
iterator
public final Iterator iterator()
doRead
protected Object doRead(ParameterReader reader,
ErrorList errors)
- Description copied from class:
AbstractParameter
- Reads the value of the parameter from
reader
,
unmarshals it, and returns it. If any errors are encountered,
they are added to errors
.
If the literal string value from reader
is not
null, this method delegates to AbstractParameter.unmarshal(String,ErrorList)
.
This implementation is suited to a parameter with a singular
scalar value. Subclasses that are compound parameters should
override this method to delegate to child parameters.
- Overrides:
doRead
in class AbstractParameter
- Parameters:
reader
- The ParameterReader
that will supply
the literal stored value for this parameter; it cannot be nullerrors
- The ErrorList
that will trap any
errors encountered; it cannot be null
doValidate
protected void doValidate(Object value,
ErrorList errors)
- Description copied from class:
AbstractParameter
- Validates
value
, placing any validation errors in
errors
. This particular implementation does
nothing. Subclasses are expected to add specific validation
behaviors.
- Overrides:
doValidate
in class AbstractParameter
- Parameters:
value
- The value to validate; it cannot be nullerrors
- The ErrorList
that traps validation
errors; it cannot be null
doWrite
protected void doWrite(ParameterWriter writer,
Object value)
- Description copied from class:
AbstractParameter
- Marshals and writes
value
to writer
.
This implementation is suited to a parameter with a singular
scalar value. Subclasses that are compound parameters should
override this method to delegate to child parameters.
- Overrides:
doWrite
in class AbstractParameter
- Parameters:
writer
- The ParameterWriter
we write to; it
cannot be nullvalue
- The value to write; it may be null
Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC