| org.geotools.referencing.AbstractIdentifiedObject org.geotools.parameter.AbstractParameterDescriptor org.geotools.parameter.DefaultParameterDescriptor
All known Subclasses: org.geotools.referencing.operation.projection.ModifiedParameterDescriptor,
DefaultParameterDescriptor | public class DefaultParameterDescriptor extends AbstractParameterDescriptor implements ParameterDescriptor(Code) | | The definition of a parameter used by an operation method.
For
most parameter values are numeric, but other types
of parameter values are possible.
For numeric values, the
is usually
.class ,
.class or
some other Java wrapper class.
This class contains numerous convenience constructors. But all of them ultimately invoke
. All other constructors are just shortcuts.
since: 2.1 version: $Id: DefaultParameterDescriptor.java 24973 2007-03-30 21:57:48Z chorner $ author: Martin Desruisseaux See Also: Parameter See Also: DefaultParameterDescriptorGroup |
Constructor Summary | |
public | DefaultParameterDescriptor(ParameterDescriptor descriptor) Constructs a descriptor with the same values than the specified one. | public | DefaultParameterDescriptor(String name, int defaultValue, int minimum, int maximum) Constructs a mandatory parameter for a range of integer values. | public | DefaultParameterDescriptor(Map properties, int defaultValue, int minimum, int maximum, boolean required) Constructs a parameter for a range of integer values. | public | DefaultParameterDescriptor(String name, double defaultValue, double minimum, double maximum, Unit unit) Constructs a mandatory parameter for a range of floating point values. | public | DefaultParameterDescriptor(Map properties, double defaultValue, double minimum, double maximum, Unit unit, boolean required) Constructs a parameter for a range of floating point values. | public | DefaultParameterDescriptor(String name, CharSequence remarks, Object defaultValue, boolean required) Constructs a parameter for a name and a default value. | public | DefaultParameterDescriptor(String name, CodeList defaultValue) Constructs a parameter for a
(or enumeration). | | DefaultParameterDescriptor(String name, Class valueClass, CodeList defaultValue) Constructs a parameter for a
(or enumeration). | public | DefaultParameterDescriptor(String name, Class valueClass, Object[] validValues, Object defaultValue) Constructs a mandatory parameter for a set of predefined values. | public | DefaultParameterDescriptor(Citation authority, String name, Class valueClass, Object[] validValues, Object defaultValue, Comparable minimum, Comparable maximum, Unit unit, boolean required) Constructs a parameter from an authority and a name. | public | DefaultParameterDescriptor(Map properties, Class valueClass, Object[] validValues, Object defaultValue, Comparable minimum, Comparable maximum, Unit unit, boolean required) Constructs a parameter from a set of properties. |
Method Summary | |
public GeneralParameterValue | createValue() Creates a new instance of
initialized with the
.
The
for the created parameter value will be
this object.
If the
specified at construction time was
a primitive type (e.g. | public boolean | equals(AbstractIdentifiedObject object, boolean compareMetadata) Compares the specified object with this parameter for equality.
Parameters: object - The object to compare to this . Parameters: compareMetadata - true for performing a strict comparaison, or false for comparing only properties relevant to transformations. | public Object | getDefaultValue() Returns the default value for the parameter. | public int | getMaximumOccurs() The maximum number of times that values for this parameter group or
parameter can be included. | public Comparable | getMaximumValue() Returns the maximum parameter value. | public Comparable | getMinimumValue() Returns the minimum parameter value. | public Unit | getUnit() Returns the unit for
,
and
values. | public Set | getValidValues() If this parameter allows only a finite set of values, returns this set.
This set is usually a {linkplain org.opengis.util.CodeList code list} or
enumerations. | public Class | getValueClass() Returns the class that describe the type of the parameter. | public int | hashCode() Returns a hash value for this parameter.
The hash code value. |
DefaultParameterDescriptor | public DefaultParameterDescriptor(ParameterDescriptor descriptor)(Code) | | Constructs a descriptor 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 |
DefaultParameterDescriptor | public DefaultParameterDescriptor(String name, int defaultValue, int minimum, int maximum)(Code) | | Constructs a mandatory parameter for a range of integer values.
Parameters: name - The parameter name. Parameters: defaultValue - The default value for the parameter. Parameters: minimum - The minimum parameter value, or Integer.MIN_VALUE if none. Parameters: maximum - The maximum parameter value, or Integer.MAX_VALUE if none. |
DefaultParameterDescriptor | public DefaultParameterDescriptor(Map properties, int defaultValue, int minimum, int maximum, boolean required)(Code) | | Constructs a parameter for a range of integer values.
Parameters: properties - The parameter properties (name, identifiers, alias...). Parameters: defaultValue - The default value for the parameter. Parameters: minimum - The minimum parameter value, or Integer.MIN_VALUE if none. Parameters: maximum - The maximum parameter value, or Integer.MAX_VALUE if none. Parameters: required - true if this parameter is required, false otherwise. |
DefaultParameterDescriptor | public DefaultParameterDescriptor(String name, double defaultValue, double minimum, double maximum, Unit unit)(Code) | | Constructs a mandatory parameter for a range of floating point values.
Parameters: name - The parameter name. Parameters: defaultValue - The default value for the parameter, or Double.NaN if none. Parameters: minimum - The minimum parameter value, or Double.NEGATIVE_INFINITY if none. Parameters: maximum - The maximum parameter value, or Double.POSITIVE_INFINITY if none. Parameters: unit - The unit for default, minimum and maximum values. |
DefaultParameterDescriptor | public DefaultParameterDescriptor(Map properties, double defaultValue, double minimum, double maximum, Unit unit, boolean required)(Code) | | Constructs a parameter for a range of floating point values.
Parameters: properties - The parameter properties (name, identifiers, alias...). Parameters: defaultValue - The default value for the parameter, or Double.NaN if none. Parameters: minimum - The minimum parameter value, or Double.NEGATIVE_INFINITY if none. Parameters: maximum - The maximum parameter value, or Double.POSITIVE_INFINITY if none. Parameters: unit - The unit for default, minimum and maximum values. Parameters: required - true if this parameter is required, false otherwise. |
DefaultParameterDescriptor | public DefaultParameterDescriptor(String name, CharSequence remarks, Object defaultValue, boolean required)(Code) | | Constructs a parameter for a name and a default value. The parameter type will
be assumed the same than the default value class.
Parameters: name - The parameter name. Parameters: remarks - An optional description as a String or anInternationalString, or null if none. Parameters: defaultValue - The default value. Parameters: required - true if this parameter is required, false otherwise. |
DefaultParameterDescriptor | public DefaultParameterDescriptor(String name, CodeList defaultValue)(Code) | | Constructs a parameter for a
(or enumeration).
Parameters: name - The parameter name. Parameters: defaultValue - The default value. |
DefaultParameterDescriptor | DefaultParameterDescriptor(String name, Class valueClass, CodeList defaultValue)(Code) | | Constructs a parameter for a
(or enumeration). This
constructor is used by the
DefaultParameterDescriptor.DefaultParameterDescriptor(String,CodeList) constructor.
Parameters: name - The parameter name. Parameters: valueClass - The class that describe the type of the parameter.Must be a subclass of CodeList. Parameters: defaultValue - The default value, or null . |
DefaultParameterDescriptor | public DefaultParameterDescriptor(String name, Class valueClass, Object[] validValues, Object defaultValue)(Code) | | Constructs a mandatory parameter for a set of predefined values.
Parameters: name - The parameter name. Parameters: valueClass - The class that describe the type of the parameter. Parameters: validValues - A finite set of valid values (usually from a{linkplain org.opengis.util.CodeList code list}) or null if it doesn't apply. Parameters: defaultValue - The default value for the parameter, or null . |
DefaultParameterDescriptor | public DefaultParameterDescriptor(Citation authority, String name, Class valueClass, Object[] validValues, Object defaultValue, Comparable minimum, Comparable maximum, Unit unit, boolean required)(Code) | | Constructs a parameter from an authority and a name.
Parameters: authority - The authority (e.g.org.geotools.metadata.iso.citation.Citations.OGC OGC). Parameters: name - The parameter name. Parameters: valueClass - The class that describe the type of the parameter. Parameters: validValues - A finite set of valid values (usually from a{linkplain org.opengis.util.CodeList code list}) or null if it doesn't apply. Parameters: defaultValue - The default value for the parameter, or null . Parameters: minimum - The minimum parameter value, or null . Parameters: maximum - The maximum parameter value, or null . Parameters: unit - The unit for default, minimum and maximum values. Parameters: required - true if this parameter is required,or false if it is optional. since: 2.2 |
DefaultParameterDescriptor | public DefaultParameterDescriptor(Map properties, Class valueClass, Object[] validValues, Object defaultValue, Comparable minimum, Comparable maximum, Unit unit, boolean required)(Code) | | Constructs a parameter from a set of properties. The properties map is
given unchanged to the
.
Parameters: properties - Set of properties. Should contains at least "name" . Parameters: valueClass - The class that describe the type of the parameter. Parameters: validValues - A finite set of valid values (usually from a{linkplain org.opengis.util.CodeList code list}) or null if it doesn't apply. Parameters: defaultValue - The default value for the parameter, or null . Parameters: minimum - The minimum parameter value, or null . Parameters: maximum - The maximum parameter value, or null . Parameters: unit - The unit for default, minimum and maximum values. Parameters: required - true if this parameter is required,or false if it is optional. |
createValue | public GeneralParameterValue createValue()(Code) | | Creates a new instance of
initialized with the
.
The
for the created parameter value will be
this object.
If the
specified at construction time was
a primitive type (e.g. Double.
instead
of
.class ), then this method may returns a specialized
parameter value implementation for this primitive type. Specialized implementations may
use less storage space and be more flexible during conversions (for example from
float to
String ), but this flexibility is not always wanted.
|
equals | public boolean equals(AbstractIdentifiedObject object, boolean compareMetadata)(Code) | | Compares the specified object with this parameter for equality.
Parameters: object - The object to compare to this . Parameters: compareMetadata - true for performing a strict comparaison, or false for comparing only properties relevant to transformations. true if both objects are equal. |
getDefaultValue | public Object getDefaultValue()(Code) | | Returns the default value for the parameter. The return type can be any type
including a
Number or a
String . If there is no default value,
then this method returns
null .
The default value, or null in none. |
getMaximumValue | public Comparable getMaximumValue()(Code) | | Returns the maximum parameter value. If there is no maximum value, or if maximum
value is inappropriate for the
, then
this method returns
null .
The minimum parameter value (often an instance of Double), or null . |
getMinimumValue | public Comparable getMinimumValue()(Code) | | Returns the minimum parameter value. If there is no minimum value, or if minimum
value is inappropriate for the
, then
this method returns
null .
The minimum parameter value (often an instance of Double), or null . |
getUnit | public Unit getUnit()(Code) | | Returns the unit for
,
and
values.
This attribute apply only if the values is of numeric type (usually an instance
of
Double ).
The unit for numeric value, or null if itdoesn't apply to the value type. |
getValidValues | public Set getValidValues()(Code) | | If this parameter allows only a finite set of values, returns this set.
This set is usually a {linkplain org.opengis.util.CodeList code list} or
enumerations. This method returns
null if this parameter
doesn't limits values to a finite set.
A finite set of valid values (usually from a{linkplain org.opengis.util.CodeList code list}),or null if it doesn't apply. |
getValueClass | public Class getValueClass()(Code) | | Returns the class that describe the type of the parameter. If the value class specified
at construction time was a primitive type (e.g.
double ), it is converted to
the corresponding wrapper class (e.g.
Double ).
The parameter value class (never a primitive type). |
hashCode | public int hashCode()(Code) | | Returns a hash value for this parameter.
The hash code value. This value doesn't need to be the samein past or future versions of this class. |
Methods inherited from org.geotools.referencing.AbstractIdentifiedObject | protected static Set asSet(Object[] array)(Code)(Java Doc) protected static void ensureAngularUnit(Unit unit) throws IllegalArgumentException(Code)(Java Doc) protected static void ensureLinearUnit(Unit unit) throws IllegalArgumentException(Code)(Java Doc) protected static void ensureNonNull(String name, Object object) throws IllegalArgumentException(Code)(Java Doc) protected static void ensureNonNull(String name, Object[] array, int index) throws IllegalArgumentException(Code)(Java Doc) protected static void ensureTimeUnit(Unit unit) throws IllegalArgumentException(Code)(Java Doc) final public boolean equals(Object object)(Code)(Java Doc) public boolean equals(AbstractIdentifiedObject object, boolean compareMetadata)(Code)(Java Doc) protected static boolean equals(IdentifiedObject object1, IdentifiedObject object2, boolean compareMetadata)(Code)(Java Doc) protected static boolean equals(IdentifiedObject[] array1, IdentifiedObject[] array2, boolean compareMetadata)(Code)(Java Doc) protected static boolean equals(Collection collection1, Collection collection2, boolean compareMetadata)(Code)(Java Doc) public Collection getAlias()(Code)(Java Doc) public ReferenceIdentifier getIdentifier(Citation authority)(Code)(Java Doc) public static ReferenceIdentifier getIdentifier(IdentifiedObject info, Citation authority)(Code)(Java Doc) public Set getIdentifiers()(Code)(Java Doc) public ReferenceIdentifier getName()(Code)(Java Doc) public String getName(Citation authority)(Code)(Java Doc) public static String getName(IdentifiedObject info, Citation authority)(Code)(Java Doc) public static Map getProperties(IdentifiedObject info)(Code)(Java Doc) public static Map getProperties(IdentifiedObject info, Citation authority)(Code)(Java Doc) public InternationalString getRemarks()(Code)(Java Doc) public int hashCode()(Code)(Java Doc) public boolean nameMatches(String name)(Code)(Java Doc) public static boolean nameMatches(IdentifiedObject object, String name)(Code)(Java Doc) public static boolean nameMatches(IdentifiedObject o1, IdentifiedObject o2)(Code)(Java Doc)
|
|
|