Package org.geotools.parameter
Class DefaultParameterDescriptorGroup
Object
Formattable
AbstractIdentifiedObject
AbstractParameterDescriptor
DefaultParameterDescriptorGroup
- All Implemented Interfaces:
Serializable
,GeneralParameterDescriptor
,ParameterDescriptorGroup
,IdentifiedObject
- Direct Known Subclasses:
ImagingParameterDescriptors
,MatrixParameterDescriptors
public class DefaultParameterDescriptorGroup
extends AbstractParameterDescriptor
implements ParameterDescriptorGroup
The definition of a group of related parameters used by an operation method.
- Since:
- 2.1
- Author:
- Martin Desruisseaux (IRD)
- See Also:
-
Field Summary
Fields inherited from class AbstractIdentifiedObject
EMPTY_ALIAS_ARRAY, EMPTY_IDENTIFIER_ARRAY, IDENTIFIER_COMPARATOR, NAME_COMPARATOR, REMARKS_COMPARATOR
Fields inherited from class Formattable
SINGLE_LINE
Fields inherited from interface IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultParameterDescriptorGroup
(String name, GeneralParameterDescriptor... parameters) Constructs a parameter group from a name.DefaultParameterDescriptorGroup
(Map<String, ?> properties, int minimumOccurs, int maximumOccurs, GeneralParameterDescriptor... parameters) Constructs a parameter group from a set of properties.DefaultParameterDescriptorGroup
(Map<String, ?> properties, GeneralParameterDescriptor... parameters) Constructs a parameter group from a set of properties.DefaultParameterDescriptorGroup
(Citation authority, String name, GeneralParameterDescriptor... parameters) Constructs a parameter group from a name and an authority.Constructs a group with the same values than the specified one. -
Method Summary
Modifier and TypeMethodDescriptionCreates a new instance of parameter value group initialized with the default values.descriptor
(String name) Returns the first parameter in this group for the specified identifier code.Returns the parameters in this group.boolean
equals
(AbstractIdentifiedObject object, boolean compareMetadata) Compares the specified object with this parameter group for equality.int
The maximum number of times that values for this parameter group are required.int
hashCode()
Returns a hash value for this parameter.Methods inherited from class AbstractParameterDescriptor
formatWKT, getMinimumOccurs
Methods inherited from class AbstractIdentifiedObject
asSet, ensureAngularUnit, ensureLinearUnit, ensureNonNull, ensureNonNull, ensureTimeUnit, equals, equals, equals, equals, getAlias, getIdentifier, getIdentifier, getIdentifiers, getName, getName, getName, getProperties, getProperties, getRemarks, nameMatches, nameMatches, nameMatches
Methods inherited from class Formattable
cleanupThreadLocals, toString, toWKT, toWKT, toWKT, toWKT
Methods inherited from interface GeneralParameterDescriptor
getMinimumOccurs
Methods inherited from interface IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
-
Constructor Details
-
DefaultParameterDescriptorGroup
Constructs a group with the same values than the specified one. This copy constructor may be used in order to wraps an arbitrary implementation into a Geotools one.- Since:
- 2.2
-
DefaultParameterDescriptorGroup
Constructs a parameter group from a name. This parameter group will be required exactly once.- Parameters:
name
- The parameter group name.parameters
- The parameter descriptors for this group.
-
DefaultParameterDescriptorGroup
public DefaultParameterDescriptorGroup(Citation authority, String name, GeneralParameterDescriptor... parameters) Constructs a parameter group from a name and an authority. This parameter group will be required exactly once.- Parameters:
authority
- The authority (e.g.OGC
).name
- The parameter group name.parameters
- The parameter descriptors for this group.- Since:
- 2.2
-
DefaultParameterDescriptorGroup
public DefaultParameterDescriptorGroup(Map<String, ?> properties, GeneralParameterDescriptor... parameters) Constructs a parameter group from a set of properties. This parameter group will be required exactly once. The properties map is given unchanged to the super-class constructor.- Parameters:
properties
- Set of properties. Should contains at least"name"
.parameters
- The parameter descriptors for this group.
-
DefaultParameterDescriptorGroup
public DefaultParameterDescriptorGroup(Map<String, ?> properties, int minimumOccurs, int maximumOccurs, GeneralParameterDescriptor... parameters) Constructs a parameter group from a set of properties. The properties map is given unchanged to the super-class constructor.- Parameters:
properties
- Set of properties. Should contains at least"name"
.minimumOccurs
- The minimum number of times that values for this parameter group are required.maximumOccurs
- The maximum number of times that values for this parameter group are required.parameters
- The parameter descriptors for this group.
-
-
Method Details
-
getMaximumOccurs
public int getMaximumOccurs()The maximum number of times that values for this parameter group are required.- Specified by:
getMaximumOccurs
in interfaceGeneralParameterDescriptor
- Specified by:
getMaximumOccurs
in classAbstractParameterDescriptor
- Returns:
- The maximum occurence.
- See Also:
-
createValue
Creates a new instance of parameter value group initialized with the default values. The parameter value descriptor for the created group will bethis
object.- Specified by:
createValue
in interfaceGeneralParameterDescriptor
- Specified by:
createValue
in interfaceParameterDescriptorGroup
- Specified by:
createValue
in classAbstractParameterDescriptor
- Returns:
- A new parameter initialized to its default value.
-
descriptors
Returns the parameters in this group.- Specified by:
descriptors
in interfaceParameterDescriptorGroup
- Returns:
- The descriptor of this group.
-
descriptor
Returns the first parameter in this group for the specified identifier code.- Specified by:
descriptor
in interfaceParameterDescriptorGroup
- Parameters:
name
- The case insensitive identifier code of the parameter to search for.- Returns:
- The parameter for the given identifier code.
- Throws:
ParameterNotFoundException
- if there is no parameter for the given identifier code.
-
equals
Compares the specified object with this parameter group for equality.- Overrides:
equals
in classAbstractParameterDescriptor
- Parameters:
object
- The object to compare tothis
.compareMetadata
-true
for performing a strict comparaison, orfalse
for comparing only properties relevant to transformations.- Returns:
true
if both objects are equal.
-
hashCode
public int hashCode()Returns a hash value for this parameter.- Overrides:
hashCode
in classAbstractParameterDescriptor
- Returns:
- The hash code value. This value doesn't need to be the same in past or future versions of this class.
-