| java.lang.Object org.geotools.referencing.wkt.Formattable org.geotools.parameter.AbstractParameter
All known Subclasses: org.geotools.parameter.Parameter, org.geotools.parameter.ParameterGroup, org.geotools.parameter.ImagingParameter, org.geotools.parameter.FloatParameter, org.geotools.parameter.ImagingParameters,
AbstractParameter | abstract public class AbstractParameter extends Formattable implements GeneralParameterValue,Serializable(Code) | | Abstract parameter value or group of parameter values.
since: 2.1 version: $Id: AbstractParameter.java 23632 2006-12-29 22:13:51Z desruisseaux $ author: Martin Desruisseaux See Also: AbstractParameterDescriptor |
Field Summary | |
final GeneralParameterDescriptor | descriptor The abstract definition of this parameter or group of parameters. |
Constructor Summary | |
protected | AbstractParameter(GeneralParameterDescriptor descriptor) Constructs a parameter value from the specified descriptor. |
Method Summary | |
public Object | clone() Returns a copy of this parameter value or group. | static void | ensureNonNull(String name, Object object) Makes sure that an argument is non-null. | static void | ensureNonNull(String name, Object[] array, int index) Makes sure an array element is non-null. | static void | ensureValidClass(Class valueClass, Object value) Verify that the specified value is of the specified class. | public boolean | equals(Object object) Compares the specified object with this parameter for equality.
Parameters: object - The object to compare to this . | final protected String | formatWKT(Formatter formatter) Format the inner part of this parameter as
Well
Known Text (WKT). | public GeneralParameterDescriptor | getDescriptor() Returns the abstract definition of this parameter or group of parameters. | static String | getName(GeneralParameterDescriptor descriptor) Convenience method returning the name of the specified descriptor. | public int | hashCode() Returns a hash value for this parameter. | final public String | toString() Returns a string representation of this parameter. | static IllegalStateException | unitlessParameter(GeneralParameterDescriptor descriptor) Returns an exception initialized with a "Unitless parameter" error message for the
specified descriptor. | protected void | write(TableWriter table) Write the content of this parameter to the specified table. |
descriptor | final GeneralParameterDescriptor descriptor(Code) | | The abstract definition of this parameter or group of parameters.
|
AbstractParameter | protected AbstractParameter(GeneralParameterDescriptor descriptor)(Code) | | Constructs a parameter value from the specified descriptor.
Parameters: descriptor - The abstract definition of this parameter or group of parameters. |
clone | public Object clone()(Code) | | Returns a copy of this parameter value or group.
|
ensureNonNull | static void ensureNonNull(String name, Object[] array, int index) throws IllegalArgumentException(Code) | | Makes sure an array element is non-null. This is
a convenience method for subclass constructors.
Parameters: name - Argument name. Parameters: array - The array to look at. Parameters: index - Index of the element to check. throws: IllegalArgumentException - if array[i] is null. |
ensureValidClass | static void ensureValidClass(Class valueClass, Object value) throws IllegalArgumentException(Code) | | Verify that the specified value is of the specified class.
Parameters: valueClass - the expected class. Parameters: value - The expected value, or null . throws: IllegalArgumentException - if value is non-null and has a non-assignableclass. |
equals | public boolean equals(Object object)(Code) | | Compares the specified object with this parameter for equality.
Parameters: object - The object to compare to this . true if both objects are equal. |
formatWKT | final protected String formatWKT(Formatter formatter)(Code) | | Format the inner part of this parameter as
Well
Known Text (WKT). This method doesn't need to be overridden, since the formatter
already know how to
.
|
getDescriptor | public GeneralParameterDescriptor getDescriptor()(Code) | | Returns the abstract definition of this parameter or group of parameters.
|
getName | static String getName(GeneralParameterDescriptor descriptor)(Code) | | Convenience method returning the name of the specified descriptor. This method is used
mostly for output to be read by human, not for processing. Consequently, we may consider
to returns a localized name in a future version.
|
hashCode | public int hashCode()(Code) | | Returns a hash value for this parameter. This value doesn't need
to be the same in past or future versions of this class.
|
toString | final public String toString()(Code) | | Returns a string representation of this parameter. The default implementation
delegates the work to
AbstractParameter.write , which should be overridden by subclasses.
|
unitlessParameter | static IllegalStateException unitlessParameter(GeneralParameterDescriptor descriptor)(Code) | | Returns an exception initialized with a "Unitless parameter" error message for the
specified descriptor.
|
write | protected void write(TableWriter table) throws IOException(Code) | | Write the content of this parameter to the specified table. This method make it easier
to align values properly than overriding the
AbstractParameter.toString method. The table's columns
are defined as below:
- The parameter name
- The separator
- The parameter value
The default implementation is suitable for most cases. However, subclasses are free to
override this method with the following idiom:
table.
("parameter name");
table.
()
table.
('=');
table.
()
table.
("parameter value");
table.
()
Parameters: table - The table where to format the parameter value. throws: IOException - if an error occurs during output operation. |
|
|