Package org.geotools.parameter
Class AbstractParameterDescriptor
- Object
- 
- Formattable
- 
- AbstractIdentifiedObject
- 
- AbstractParameterDescriptor
 
 
 
- 
- All Implemented Interfaces:
- Serializable,- GeneralParameterDescriptor,- IdentifiedObject
 - Direct Known Subclasses:
- DefaultParameterDescriptor,- DefaultParameterDescriptorGroup
 
 public abstract class AbstractParameterDescriptor extends AbstractIdentifiedObject implements GeneralParameterDescriptor Abstract definition of a parameter or group of parameters used by an operation method.- Since:
- 2.1
- Author:
- Martin Desruisseaux (IRD)
- See Also:
- AbstractParameter, Serialized Form
 
- 
- 
Field Summary- 
Fields inherited from class AbstractIdentifiedObjectEMPTY_ALIAS_ARRAY, EMPTY_IDENTIFIER_ARRAY, IDENTIFIER_COMPARATOR, NAME_COMPARATOR, REMARKS_COMPARATOR
 - 
Fields inherited from class FormattableSINGLE_LINE
 - 
Fields inherited from interface IdentifiedObjectALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedAbstractParameterDescriptor(Map<String,?> properties, int minimumOccurs, int maximumOccurs)Constructs a parameter from a set of properties.protectedAbstractParameterDescriptor(GeneralParameterDescriptor descriptor)Constructs a descriptor with the same values than the specified one.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract GeneralParameterValuecreateValue()Creates a new instance of parameter value or group initialized with the default value(s).booleanequals(AbstractIdentifiedObject object, boolean compareMetadata)Compares the specified object with this parameter for equality.protected StringformatWKT(Formatter formatter)Format the inner part of a Well Known Text (WKT) element.abstract intgetMaximumOccurs()The maximum number of times that values for this parameter group or parameter can be included.intgetMinimumOccurs()The minimum number of times that values for this parameter group or parameter are required.inthashCode()Returns a hash value for this parameter.- 
Methods inherited from class AbstractIdentifiedObjectasSet, 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 FormattablecleanupThreadLocals, toString, toWKT, toWKT, toWKT, toWKT
 - 
Methods inherited from interface IdentifiedObjectgetAlias, getIdentifiers, getName, getRemarks, toWKT
 
- 
 
- 
- 
- 
Constructor Detail- 
AbstractParameterDescriptorprotected AbstractParameterDescriptor(GeneralParameterDescriptor descriptor) 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
 
 - 
AbstractParameterDescriptorprotected AbstractParameterDescriptor(Map<String,?> properties, int minimumOccurs, int maximumOccurs) Constructs a parameter 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 or parameter are required.
- maximumOccurs- The maximum number of times that values for this parameter group or parameter are required. This value is used in order to check the range. For- ParameterValue, it should always be 1.
 
 
- 
 - 
Method Detail- 
createValuepublic abstract GeneralParameterValue createValue() Creates a new instance of parameter value or group initialized with the default value(s). The parameter value descriptor for the created parameter value(s) will bethisobject.Example implementation: return new Parameter(this); - Specified by:
- createValuein interface- GeneralParameterDescriptor
- Returns:
- A new parameter initialized to its default value.
 
 - 
getMinimumOccurspublic int getMinimumOccurs() The minimum number of times that values for this parameter group or parameter are required. The default value is one. A value of 0 means an optional parameter.- Specified by:
- getMinimumOccursin interface- GeneralParameterDescriptor
- Returns:
- The minimum occurence.
- See Also:
- getMaximumOccurs()
 
 - 
getMaximumOccurspublic abstract int getMaximumOccurs() The maximum number of times that values for this parameter group or parameter can be included. For a single parameter, the value is always 1. For a parameter group, it may vary.- Specified by:
- getMaximumOccursin interface- GeneralParameterDescriptor
- Returns:
- The maximum occurence.
- See Also:
- getMinimumOccurs()
 
 - 
equalspublic boolean equals(AbstractIdentifiedObject object, boolean compareMetadata) Compares the specified object with this parameter for equality.- Overrides:
- equalsin class- AbstractIdentifiedObject
- Parameters:
- object- The object to compare to- this.
- compareMetadata-- truefor performing a strict comparaison, or- falsefor comparing only properties relevant to transformations.
- Returns:
- trueif both objects are equal.
 
 - 
hashCodepublic int hashCode() Returns a hash value for this parameter.- Overrides:
- hashCodein class- AbstractIdentifiedObject
- Returns:
- The hash code value. This value doesn't need to be the same in past or future versions of this class.
 
 - 
formatWKTprotected String formatWKT(Formatter formatter) Format the inner part of a Well Known Text (WKT) element. Note that WKT is not yet defined for parameter descriptor. Current implementation print only the name.- Overrides:
- formatWKTin class- Formattable
- Parameters:
- formatter- The formatter to use.
- Returns:
- The WKT element name, which is "PARAMETER"
- See Also:
- Formattable.toWKT(),- Formattable.toString()
 
 
- 
 
-