|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectFormattable
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 ParameterValue
s which suitably distinquish among
those groups.
DefaultParameterDescriptorGroup
,
Parameter
,
Serialized Form
modules/library/referencing (gt-referencing.jar)
Field Summary | |
---|---|
static ParameterValueGroup |
EMPTY
An empty parameter value group. |
Fields inherited from class Formattable |
---|
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 Formattable |
---|
cleanupThreadLocals, toWKT, toWKT, toWKT |
Methods inherited from class Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static 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
occurences doesn't matches the number 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
occurences doesn't matches the number declared in the
descriptor.Method Detail |
---|
public ParameterDescriptorGroup getDescriptor()
getDescriptor
in interface GeneralParameterValue
getDescriptor
in interface ParameterValueGroup
getDescriptor
in class AbstractParameter
public 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 do 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 ParameterValueGroup
name
- The case insensitive identifier code of the
parameter to search for.
ParameterNotFoundException
- if there is no parameter value for the given identifier
code.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 ParameterValueGroup
name
- 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 ParameterValueGroup
name
- 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 occurences
of subgroups of the given name.public boolean equals(Object object)
equals
in class AbstractParameter
object
- The object to compare to this
.
true
if both objects are equal.public int hashCode()
hashCode
in class AbstractParameter
public ParameterGroup clone()
clone
in interface GeneralParameterValue
clone
in interface ParameterValueGroup
clone
in class AbstractParameter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |