|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.referencing.wkt.Formattable
org.geotools.referencing.AbstractIdentifiedObject
org.geotools.parameter.AbstractParameterDescriptor
org.geotools.parameter.DefaultParameterDescriptor<T>
T
- The type of elements to be returned by ParameterValue.getValue()
.public class DefaultParameterDescriptor<T>
The definition of a parameter used by an operation method. For Coordinate Reference Systems most parameter values are numeric, but other types of parameter values are possible.
For numeric values, the value class is usually
Double.class
, Integer.class
or
some other Java wrapper class.
This class contains numerous convenience constructors. But all of them ultimately invoke a single, full-featured constructor. All other constructors are just shortcuts.
Parameter
,
DefaultParameterDescriptorGroup
,
Serialized FormField Summary |
---|
Fields inherited from class org.geotools.referencing.AbstractIdentifiedObject |
---|
EMPTY_ALIAS_ARRAY, EMPTY_IDENTIFIER_ARRAY, IDENTIFIER_COMPARATOR, NAME_COMPARATOR, REMARKS_COMPARATOR |
Fields inherited from class org.geotools.referencing.wkt.Formattable |
---|
SINGLE_LINE |
Fields inherited from interface org.opengis.referencing.IdentifiedObject |
---|
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY |
Constructor Summary | |
---|---|
DefaultParameterDescriptor(org.opengis.metadata.citation.Citation authority,
java.lang.String name,
java.lang.Class<T> valueClass,
T[] validValues,
T defaultValue,
java.lang.Comparable<T> minimum,
java.lang.Comparable<T> maximum,
javax.measure.unit.Unit<?> unit,
boolean required)
Constructs a parameter from an authority and a name. |
|
DefaultParameterDescriptor(java.util.Map<java.lang.String,?> properties,
java.lang.Class<T> valueClass,
T[] validValues,
T defaultValue,
java.lang.Comparable<T> minimum,
java.lang.Comparable<T> maximum,
javax.measure.unit.Unit<?> unit,
boolean required)
Constructs a parameter from a set of properties. |
|
DefaultParameterDescriptor(org.opengis.parameter.ParameterDescriptor<T> descriptor)
Constructs a descriptor with the same values than the specified one. |
|
DefaultParameterDescriptor(java.lang.String name,
java.lang.Class<T> valueClass,
T[] validValues,
T defaultValue)
Constructs a mandatory parameter for a set of predefined values. |
Method Summary | ||
---|---|---|
static DefaultParameterDescriptor<java.lang.Double> |
create(java.util.Map<java.lang.String,?> properties,
double defaultValue,
double minimum,
double maximum,
javax.measure.unit.Unit<?> unit,
boolean required)
Constructs a descriptor for a parameter in a range of floating point values. |
|
static DefaultParameterDescriptor<java.lang.Integer> |
create(java.util.Map<java.lang.String,?> properties,
int defaultValue,
int minimum,
int maximum,
boolean required)
Constructs a descriptor for a parameter in a range of integer values. |
|
static
|
create(java.lang.String name,
java.lang.CharSequence remarks,
java.lang.Class<T> valueClass,
T defaultValue,
boolean required)
Constructs a descriptor from a name and a default value. |
|
static DefaultParameterDescriptor<java.lang.Double> |
create(java.lang.String name,
double defaultValue,
double minimum,
double maximum,
javax.measure.unit.Unit<?> unit)
Constructs a descriptor for a mandatory parameter in a range of floating point values. |
|
static DefaultParameterDescriptor<java.lang.Integer> |
create(java.lang.String name,
int defaultValue,
int minimum,
int maximum)
Constructs a descriptor for a mandatory parameter in a range of integer values. |
|
org.opengis.parameter.ParameterValue<T> |
createValue()
Creates a new instance of parameter value initialized with the default value. |
|
boolean |
equals(AbstractIdentifiedObject object,
boolean compareMetadata)
Compares the specified object with this parameter for equality. |
|
T |
getDefaultValue()
Returns the default value for the parameter. |
|
int |
getMaximumOccurs()
The maximum number of times that values for this parameter group or parameter can be included. |
|
java.lang.Comparable<T> |
getMaximumValue()
Returns the maximum parameter value. |
|
java.lang.Comparable<T> |
getMinimumValue()
Returns the minimum parameter value. |
|
javax.measure.unit.Unit<?> |
getUnit()
Returns the unit for default, minimum and maximum values. |
|
java.util.Set<T> |
getValidValues()
If this parameter allows only a finite set of values, returns this set. |
|
java.lang.Class<T> |
getValueClass()
Returns the class that describe the type of the parameter. |
|
int |
hashCode()
Returns a hash value for this parameter. |
Methods inherited from class org.geotools.parameter.AbstractParameterDescriptor |
---|
formatWKT, getMinimumOccurs |
Methods inherited from class org.geotools.referencing.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 org.geotools.referencing.wkt.Formattable |
---|
cleanupThreadLocals, toString, toWKT, toWKT, toWKT |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.opengis.parameter.GeneralParameterDescriptor |
---|
getMinimumOccurs |
Methods inherited from interface org.opengis.referencing.IdentifiedObject |
---|
getAlias, getIdentifiers, getName, getRemarks, toWKT |
Constructor Detail |
---|
public DefaultParameterDescriptor(org.opengis.parameter.ParameterDescriptor<T> descriptor)
descriptor
- The descriptor to copy.public DefaultParameterDescriptor(java.lang.String name, java.lang.Class<T> valueClass, T[] validValues, T defaultValue)
name
- The parameter name.valueClass
- The class that describe the type of the parameter.validValues
- A finite set of valid values (usually from a
{linkplain org.opengis.util.CodeList code list}) or null
if it doesn't apply.defaultValue
- The default value for the parameter, or null
.public DefaultParameterDescriptor(org.opengis.metadata.citation.Citation authority, java.lang.String name, java.lang.Class<T> valueClass, T[] validValues, T defaultValue, java.lang.Comparable<T> minimum, java.lang.Comparable<T> maximum, javax.measure.unit.Unit<?> unit, boolean required)
authority
- The authority (e.g.
OGC
).name
- The parameter name.valueClass
- The class that describe the type of the parameter.validValues
- A finite set of valid values (usually from a
{linkplain org.opengis.util.CodeList code list}) or null
if it doesn't apply.defaultValue
- The default value for the parameter, or null
.minimum
- The minimum parameter value, or null
.maximum
- The maximum parameter value, or null
.unit
- The unit for default, minimum and maximum values.required
- true
if this parameter is required,
or false
if it is optional.public DefaultParameterDescriptor(java.util.Map<java.lang.String,?> properties, java.lang.Class<T> valueClass, T[] validValues, T defaultValue, java.lang.Comparable<T> minimum, java.lang.Comparable<T> maximum, javax.measure.unit.Unit<?> unit, boolean required)
properties
- Set of properties. Should contains at least "name"
.valueClass
- The class that describe the type of the parameter.validValues
- A finite set of valid values (usually from a
{linkplain org.opengis.util.CodeList code list}) or null
if it doesn't apply.defaultValue
- The default value for the parameter, or null
.minimum
- The minimum parameter value, or null
.maximum
- The maximum parameter value, or null
.unit
- The unit for default, minimum and maximum values.required
- true
if this parameter is required,
or false
if it is optional.Method Detail |
---|
public static DefaultParameterDescriptor<java.lang.Integer> create(java.lang.String name, int defaultValue, int minimum, int maximum)
name
- The parameter name.defaultValue
- The default value for the parameter.minimum
- The minimum parameter value, or Integer.MIN_VALUE
if none.maximum
- The maximum parameter value, or Integer.MAX_VALUE
if none.
public static DefaultParameterDescriptor<java.lang.Integer> create(java.util.Map<java.lang.String,?> properties, int defaultValue, int minimum, int maximum, boolean required)
properties
- The parameter properties (name, identifiers, alias...).defaultValue
- The default value for the parameter.minimum
- The minimum parameter value, or Integer.MIN_VALUE
if none.maximum
- The maximum parameter value, or Integer.MAX_VALUE
if none.required
- true
if this parameter is required, false
otherwise.
public static DefaultParameterDescriptor<java.lang.Double> create(java.lang.String name, double defaultValue, double minimum, double maximum, javax.measure.unit.Unit<?> unit)
name
- The parameter name.defaultValue
- The default value for the parameter, or Double.NaN
if none.minimum
- The minimum parameter value, or Double.NEGATIVE_INFINITY
if none.maximum
- The maximum parameter value, or Double.POSITIVE_INFINITY
if none.unit
- The unit for default, minimum and maximum values.
public static DefaultParameterDescriptor<java.lang.Double> create(java.util.Map<java.lang.String,?> properties, double defaultValue, double minimum, double maximum, javax.measure.unit.Unit<?> unit, boolean required)
properties
- The parameter properties (name, identifiers, alias...).defaultValue
- The default value for the parameter, or Double.NaN
if none.minimum
- The minimum parameter value, or Double.NEGATIVE_INFINITY
if none.maximum
- The maximum parameter value, or Double.POSITIVE_INFINITY
if none.unit
- The unit of measurement for default, minimum and maximum values.required
- true
if this parameter is required, false
otherwise.
public static <T> DefaultParameterDescriptor<T> create(java.lang.String name, java.lang.CharSequence remarks, java.lang.Class<T> valueClass, T defaultValue, boolean required)
T
- The parameter type.name
- The parameter name.remarks
- An optional description as a String
or an InternationalString
.valueClass
- The parameter type.defaultValue
- The default value.required
- true
if this parameter is required, false
otherwise.
public int getMaximumOccurs()
getMaximumOccurs
in interface org.opengis.parameter.GeneralParameterDescriptor
getMaximumOccurs
in class AbstractParameterDescriptor
AbstractParameterDescriptor.getMinimumOccurs()
public org.opengis.parameter.ParameterValue<T> createValue()
this
object.
createValue
in interface org.opengis.parameter.GeneralParameterDescriptor
createValue
in interface org.opengis.parameter.ParameterDescriptor<T>
createValue
in class AbstractParameterDescriptor
public java.lang.Class<T> getValueClass()
getValueClass
in interface org.opengis.parameter.ParameterDescriptor<T>
public java.util.Set<T> getValidValues()
null
if this parameter
doesn't limits values to a finite set.
getValidValues
in interface org.opengis.parameter.ParameterDescriptor<T>
null
if it doesn't apply.public T getDefaultValue()
Number
or a String
. If there is no default value,
then this method returns null
.
getDefaultValue
in interface org.opengis.parameter.ParameterDescriptor<T>
null
in none.public java.lang.Comparable<T> getMinimumValue()
null
.
getMinimumValue
in interface org.opengis.parameter.ParameterDescriptor<T>
Double
), or null
.public java.lang.Comparable<T> getMaximumValue()
null
.
getMaximumValue
in interface org.opengis.parameter.ParameterDescriptor<T>
Double
), or null
.public javax.measure.unit.Unit<?> getUnit()
Double
).
getUnit
in interface org.opengis.parameter.ParameterDescriptor<T>
null
if it
doesn't apply to the value type.public boolean equals(AbstractIdentifiedObject object, boolean compareMetadata)
equals
in class AbstractParameterDescriptor
object
- The object to compare to this
.compareMetadata
- true
for performing a strict comparaison, or
false
for comparing only properties relevant to transformations.
true
if both objects are equal.public int hashCode()
hashCode
in class AbstractParameterDescriptor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |