|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectFormattableObject
AbstractParameter
ParameterGroup
public class ParameterGroup
A group of related parameter values. The same group can be repeated more than once in
an operation or higher level
ParameterValueGroup, if those instances contain different values of one or more
ParameterValues which suitably distinguish among those groups.
DefaultParameterDescriptorGroup,
Parameter,
Serialized Form
| referencing/geotk-referencing (download) | View source code for this class |
| Field Summary | |
|---|---|
static ParameterValueGroup |
EMPTY
An empty parameter value group. |
| Fields inherited from class FormattableObject |
|---|
EPSG, GEOTIFF, INTERNAL, OGC, SINGLE_LINE |
| Constructor Summary | |
|---|---|
ParameterGroup(Map<String,?> properties,
GeneralParameterValue... values)
Constructs a parameter group from the specified list of parameters. |
|
ParameterGroup(ParameterDescriptorGroup descriptor)
Constructs a parameter group from the specified descriptor. |
|
ParameterGroup(ParameterDescriptorGroup descriptor,
GeneralParameterValue... values)
Constructs a parameter group from the specified descriptor and list of parameters. |
|
| Method Summary | |
|---|---|
ParameterValueGroup |
addGroup(String name)
Creates a new group of the specified name. |
ParameterGroup |
clone()
Returns a deep copy of this group of parameter values. |
boolean |
equals(Object object)
Compares the specified object with this parameter for equality. |
ParameterDescriptorGroup |
getDescriptor()
Returns the abstract definition of this group of parameters. |
List<ParameterValueGroup> |
groups(String name)
Returns all subgroups with the specified name. |
int |
hashCode()
Returns a hash value for this parameter. |
ParameterValue<?> |
parameter(String name)
Returns the value in this group for the specified identifier code. |
List<GeneralParameterValue> |
values()
Returns the values in this group. |
| Methods inherited from class AbstractParameter |
|---|
formatWKT, toString, write |
| Methods inherited from class FormattableObject |
|---|
getDefaultIndentation, print, setDefaultIndentation, toWKT, toWKT, toWKT |
| Methods inherited from class Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final ParameterValueGroup EMPTY
| Constructor Detail |
|---|
public ParameterGroup(ParameterDescriptorGroup descriptor)
descriptor - The descriptor for this group.
public ParameterGroup(ParameterDescriptorGroup descriptor,
GeneralParameterValue... values)
descriptor - The descriptor for this group.values - The list of parameter values.
IllegalStateException - If the number of parameter values is not in the
range of minimum and maximum occurrences declared in the descriptor.
public ParameterGroup(Map<String,?> properties,
GeneralParameterValue... values)
properties - The properties for the operation parameter group to construct from the list of parameters.values - The list of parameter values.
IllegalStateException - If the number of parameter values is not in the
range of minimum and maximum occurrences declared in the descriptor.| Method Detail |
|---|
public ParameterDescriptorGroup getDescriptor()
getDescriptor in interface GeneralParameterValuegetDescriptor in interface ParameterValueGroupgetDescriptor in class AbstractParameterpublic List<GeneralParameterValue> values()
ParameterValueGroup. The returned list supports the
add operation.
values in interface ParameterValueGroup
public ParameterValue<?> parameter(String name)
throws ParameterNotFoundException
minimumOccurs == 0),
then a parameter value is automatically created and initialized
to its default value (if any).
This convenience method provides a way to get and set parameter values by name. For example
the following idiom fetches a floating point value for the "false_easting" parameter:
double value = parameter("false_easting").doubleValue();
This method does not search recursively in subgroups. This is because more than one subgroup
may exist for the same descriptor. The user must
query all subgroups and select explicitly the appropriate one to use.
parameter in interface ParameterValueGroupname - The case insensitive identifier code of the
parameter to search for.
ParameterNotFoundException - if there is no parameter value for the given identifier
code.Parameters.getOrCreate(ParameterDescriptor, ParameterValueGroup)
public List<ParameterValueGroup> groups(String name)
throws ParameterNotFoundException
minimumOccurs == 0)
and no value were set, then this method returns an empty set.
groups in interface ParameterValueGroupname - The case insensitive identifier code
of the parameter group to search for.
ParameterNotFoundException - If no descriptor
was found for the given name.
public ParameterValueGroup addGroup(String name)
throws ParameterNotFoundException,
InvalidParameterCardinalityException
addGroup in interface ParameterValueGroupname - The case insensitive identifier code of the
parameter group to create.
ParameterNotFoundException - If no descriptor
was found for the given name.
InvalidParameterCardinalityException - If this parameter group already contains the
maximum number of occurrences
of subgroups of the given name.public boolean equals(Object object)
equals in class AbstractParameterobject - The object to compare to this.
true if both objects are equal.public int hashCode()
hashCode in class AbstractParameterpublic ParameterGroup clone()
clone in interface GeneralParameterValueclone in interface ParameterValueGroupclone in class AbstractParameter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||