Package org.geotools.api.parameter
Interface ParameterDescriptor<T>
-
- Type Parameters:
T
- The type of parameter values.
- All Superinterfaces:
GeneralParameterDescriptor
,IdentifiedObject
- All Known Implementing Classes:
DefaultParameterDescriptor
@UML(identifier="CC_OperationParameter", specification=ISO_19111) public interface ParameterDescriptor<T> extends GeneralParameterDescriptor
The definition of a parameter used by an operation method. Most parameter values are numeric, but other types of parameter values are possible.- Since:
- GeoAPI 2.0
- Author:
- Martin Desruisseaux (IRD), Jody Garnett (Refractions Research)
- See Also:
ParameterValue
,ParameterDescriptorGroup
-
-
Field Summary
-
Fields inherited from interface IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ParameterValue<T>
createValue()
Creates a new instance of parameter value initialized with the default value.T
getDefaultValue()
Returns the default value for the parameter.Comparable<T>
getMaximumValue()
Returns the maximum parameter value.Comparable<T>
getMinimumValue()
Returns the minimum parameter value.Unit<?>
getUnit()
Set<T>
getValidValues()
Returns the set of allowed values when these are restricted to some finite set or returnsnull
otherwise.Class<T>
getValueClass()
Returns the class that describe the type of the parameter.-
Methods inherited from interface GeneralParameterDescriptor
getMaximumOccurs, getMinimumOccurs
-
Methods inherited from interface IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
-
-
-
-
Method Detail
-
createValue
ParameterValue<T> createValue()
Creates a new instance of parameter value initialized with the default value. The parameter value descriptor for the created parameter value will bethis
object.- Specified by:
createValue
in interfaceGeneralParameterDescriptor
- Returns:
- A new parameter initialized to its default value.
-
getValueClass
@UML(identifier="GC_ParameterInfo.type", obligation=MANDATORY, specification=ISO_19111) Class<T> getValueClass()
Returns the class that describe the type of the parameter.- Returns:
- The type of parameter values.
-
getValidValues
Set<T> getValidValues()
Returns the set of allowed values when these are restricted to some finite set or returnsnull
otherwise. The returned set usually contains code list or enumeration elements.- Returns:
- A finite set of valid values (usually from a code list), or
null
if it doesn't apply.
-
getDefaultValue
@UML(identifier="GC_ParameterInfo.defaultValue", obligation=OPTIONAL, specification=ISO_19111) T getDefaultValue()
Returns the default value for the parameter. The return type can be any type including aNumber
or aString
. If there is no default value, then this method returnsnull
.- Returns:
- The default value, or
null
in none.
-
getMinimumValue
@UML(identifier="GC_ParameterInfo.minimumValue", obligation=OPTIONAL, specification=ISO_19111) Comparable<T> getMinimumValue()
Returns the minimum parameter value.If there is no minimum value, or if minimum value is inappropriate for the parameter type, then this method returns
null
.When the getValueClass() is an array or Collection getMinimumValue may be used to constrain the contained elements.
- Returns:
- The minimum parameter value (often an instance of
Double
), ornull
.
-
getMaximumValue
@UML(identifier="GC_ParameterInfo.maximumValue", obligation=OPTIONAL, specification=ISO_19111) Comparable<T> getMaximumValue()
Returns the maximum parameter value.If there is no maximum value, or if maximum value is inappropriate for the parameter type, then this method returns
null
.When the getValueClass() is an array or Collection getMaximumValue may be used to constratin the contained elements.
- Returns:
- The minimum parameter value (often an instance of
Double
), ornull
.
-
-