Java Doc for Parameter.java in  » GIS » GeoTools-2.4.1 » org » geotools » parameter » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.parameter 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.geotools.parameter.AbstractParameter
   org.geotools.parameter.Parameter

All known Subclasses:   org.geotools.data.wms.gce.WMSParameterValue,
Parameter
public class Parameter extends AbstractParameter implements ParameterValue(Code)
A parameter value used by an operation method. Most CRS parameter values are numeric, but other types of parameter values are possible. The parameter type can be fetch with the . idiom. The Parameter.getValue() and Parameter.setValue(Object) methods can be invoked at any time. Others getters and setters are parameter-type dependents.
since:
   2.1
version:
   $Id: Parameter.java 26799 2007-08-31 21:31:21Z desruisseaux $
author:
   Martin Desruisseaux
author:
   Jody Garnett (Refractions Research)
See Also:   DefaultParameterDescriptor
See Also:   ParameterGroup



Constructor Summary
public  Parameter(String name, int value)
     Constructs a parameter from the specified name and value.
public  Parameter(String name, double value, Unit unit)
     Constructs a parameter from the specified name and value.
public  Parameter(String name, CodeList value)
     Constructs a parameter from the specified enumeration.
public  Parameter(ParameterDescriptor descriptor)
     Constructs a parameter value from the specified descriptor.
public  Parameter(ParameterDescriptor descriptor, Object value)
     Constructs a parameter value from the specified descriptor and value.

Method Summary
public  booleanbooleanValue()
     Returns the boolean value of an operation parameter.
public  doubledoubleValue(Unit unit)
     Returns the numeric value of the coordinate operation parameter in the specified unit of measure.
public  doubledoubleValue()
     Returns the numeric value of the coordinate operation parameter with its associated .
public  double[]doubleValueList(Unit unit)
     Returns an ordered sequence of numeric values in the specified unit of measure. This convenience method apply unit conversion on the fly as needed.
Parameters:
  unit - The unit of measure for the value to be returned.
public  double[]doubleValueList()
     Returns an ordered sequence of two or more numeric values of an operation parameter list, where each value has the same associated .
public static  voidensureValidValue(ParameterDescriptor descriptor, Object value)
     Ensures that the given value is valid according the specified parameter descriptor.
public  booleanequals(Object object)
     Compares the specified object with this parameter for equality.
Parameters:
  object - The object to compare to this .
public  UnitgetUnit()
     Returns the unit of measure of the . If the parameter value has no unit (for example because it is a String type), then this method returns null .
static  intgetUnitMessageID(Unit unit)
     Returns the unit type as one of error message code.
public  ObjectgetValue()
     Returns the parameter value as an object.
public  inthashCode()
     Returns a hash value for this parameter. The hash code value.
public  intintValue()
     Returns the positive integer value of an operation parameter, usually used for a count.
public  int[]intValueList()
     Returns an ordered sequence of two or more integer values of an operation parameter list, usually used for counts.
static  Comparablereplace(Comparable value)
     Replace the specified value by the cached value, if it exists.
public  voidsetValue(double value, Unit unit)
     Set the parameter value as a floating point and its associated unit.
public  voidsetValue(double value)
     Set the parameter value as a floating point.
public  voidsetValue(int value)
     Set the parameter value as an integer.
public  voidsetValue(boolean value)
     Set the parameter value as a boolean.
public  voidsetValue(Object value)
     Set the parameter value as an object.
public  voidsetValue(double[] values, Unit unit)
     Set the parameter value as an array of floating point and their associated unit.
public  StringstringValue()
     Returns the string value of an operation parameter.
public  URIvalueFile()
     Returns a reference to a file or a part of a file containing one or more parameter values.
static  Integerwrap(int value)
     Wraps the specified value in an Integer object.
static  Doublewrap(double value)
     Wraps the specified value in an Double object.


Constructor Detail
Parameter
public Parameter(String name, int value)(Code)
Constructs a parameter from the specified name and value. This convenience constructor creates a DefaultParameterDescriptor object. But if such an object was available, then the preferred way to get a ParameterValue is to invokes ParameterDescriptor.createValue .
Parameters:
  name - The parameter name.
Parameters:
  value - The parameter value.



Parameter
public Parameter(String name, double value, Unit unit)(Code)
Constructs a parameter from the specified name and value. This convenience constructor creates a DefaultParameterDescriptor object. But if such an object was available, then the preferred way to get a ParameterValue is to invokes ParameterDescriptor.createValue .
Parameters:
  name - The parameter name.
Parameters:
  value - The parameter value.
Parameters:
  unit - The unit for the parameter value.



Parameter
public Parameter(String name, CodeList value)(Code)
Constructs a parameter from the specified enumeration. This convenience constructor creates a DefaultParameterDescriptor object. But if such an object was available, then the preferred way to get a ParameterValue is to invokes ParameterDescriptor.createValue .
Parameters:
  name - The parameter name.
Parameters:
  value - The parameter value.



Parameter
public Parameter(ParameterDescriptor descriptor)(Code)
Constructs a parameter value from the specified descriptor. The value will be initialized to the default value, if any.
Parameters:
  descriptor - The abstract definition of this parameter.



Parameter
public Parameter(ParameterDescriptor descriptor, Object value) throws InvalidParameterValueException(Code)
Constructs a parameter value from the specified descriptor and value.
Parameters:
  descriptor - The abstract definition of this parameter.
Parameters:
  value - The parameter value.
throws:
  InvalidParameterValueException - if the type of value is inappropriatefor this parameter, or if the value is illegal for some other reason (for examplethe value is numeric and out of range).




Method Detail
booleanValue
public boolean booleanValue() throws InvalidParameterTypeException(Code)
Returns the boolean value of an operation parameter. A boolean value does not have an associated unit of measure. The boolean value represented by this parameter.
throws:
  InvalidParameterTypeException - if the value is not a boolean type.
See Also:   Parameter.setValue(boolean)



doubleValue
public double doubleValue(Unit unit) throws InvalidParameterTypeException(Code)
Returns the numeric value of the coordinate operation parameter in the specified unit of measure. This convenience method apply unit conversion on the fly as needed.
Parameters:
  unit - The unit of measure for the value to be returned. The numeric value represented by this parameter after conversion to type double and conversion to unit .
throws:
  InvalidParameterTypeException - if the value is not a numeric type.
throws:
  IllegalArgumentException - if the specified unit is invalid for this parameter.
See Also:   Parameter.getUnit
See Also:   Parameter.setValue(double,Unit)
See Also:   Parameter.doubleValueList(Unit)



doubleValue
public double doubleValue() throws InvalidParameterTypeException(Code)
Returns the numeric value of the coordinate operation parameter with its associated . The numeric value represented by this parameter after conversion to type double .
throws:
  InvalidParameterTypeException - if the value is not a numeric type.
See Also:   Parameter.getUnit
See Also:   Parameter.setValue(double)
See Also:   Parameter.doubleValueList()



doubleValueList
public double[] doubleValueList(Unit unit) throws InvalidParameterTypeException(Code)
Returns an ordered sequence of numeric values in the specified unit of measure. This convenience method apply unit conversion on the fly as needed.
Parameters:
  unit - The unit of measure for the value to be returned. The sequence of values represented by this parameter after conversion to type double and conversion to unit .
throws:
  InvalidParameterTypeException - if the value is not an array of double s.
throws:
  IllegalArgumentException - if the specified unit is invalid for this parameter.
See Also:   Parameter.getUnit
See Also:   Parameter.setValue(double[],Unit)
See Also:   Parameter.doubleValue(Unit)



doubleValueList
public double[] doubleValueList() throws InvalidParameterTypeException(Code)
Returns an ordered sequence of two or more numeric values of an operation parameter list, where each value has the same associated . The sequence of values represented by this parameter.
throws:
  InvalidParameterTypeException - if the value is not an array of double s.
See Also:   Parameter.getUnit
See Also:   Parameter.setValue(Object)
See Also:   Parameter.doubleValue()



ensureValidValue
public static void ensureValidValue(ParameterDescriptor descriptor, Object value) throws InvalidParameterValueException(Code)
Ensures that the given value is valid according the specified parameter descriptor. This convenience method ensures that value is assignable to the , is between the and values and is one of the . If the value fails any of those tests, then an exception is thrown.
Parameters:
  descriptor - The parameter descriptor to check against.
Parameters:
  value - The value to check, or null .
throws:
  InvalidParameterValueException - if the parameter value is invalid.



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.



getUnit
public Unit getUnit()(Code)
Returns the unit of measure of the . If the parameter value has no unit (for example because it is a String type), then this method returns null . Note that "no unit" doesn't means "dimensionless". The unit of measure, or null if none.
See Also:   Parameter.doubleValue()
See Also:   Parameter.doubleValueList()
See Also:   Parameter.getValue



getUnitMessageID
static int getUnitMessageID(Unit unit)(Code)
Returns the unit type as one of error message code. Used for checking unit with a better error message formatting if needed.

Note: It is difficult to differentiate scale and angular units, since both of them are dimensionless. However, in EPSG database version 6.7, there is only 3 scale units and all of them maps to Unit.ONE or Units.PPM . Consequently, they are hard-coded and treated especially by this method.




getValue
public Object getValue()(Code)
Returns the parameter value as an object. The object type is typically a Double , Integer , Boolean , String , URI , double[] or int[] . The parameter value as an object.
See Also:   Parameter.setValue(Object)



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.



intValue
public int intValue() throws InvalidParameterTypeException(Code)
Returns the positive integer value of an operation parameter, usually used for a count. An integer value does not have an associated unit of measure. The numeric value represented by this parameter after conversion to type int .
throws:
  InvalidParameterTypeException - if the value is not an integer type.
See Also:   Parameter.setValue(int)
See Also:   Parameter.intValueList



intValueList
public int[] intValueList() throws InvalidParameterTypeException(Code)
Returns an ordered sequence of two or more integer values of an operation parameter list, usually used for counts. These integer values do not have an associated unit of measure. The sequence of values represented by this parameter.
throws:
  InvalidParameterTypeException - if the value is not an array of int s.
See Also:   Parameter.setValue(Object)
See Also:   Parameter.intValue



replace
static Comparable replace(Comparable value)(Code)
Replace the specified value by the cached value, if it exists. This is used for reducing memory usage for frequently used values.



setValue
public void setValue(double value, Unit unit) throws InvalidParameterValueException(Code)
Set the parameter value as a floating point and its associated unit.
Parameters:
  value - The parameter value.
Parameters:
  unit - The unit for the specified value.
throws:
  InvalidParameterValueException - if the floating point type is inappropriate for thisparameter, or if the value is illegal for some other reason (for example a value outof range).
See Also:   Parameter.setValue(double)
See Also:   Parameter.doubleValue(Unit)



setValue
public void setValue(double value) throws InvalidParameterValueException(Code)
Set the parameter value as a floating point. The unit, if any, stay unchanged.
Parameters:
  value - The parameter value.
throws:
  InvalidParameterValueException - if the floating point type is inappropriate for thisparameter, or if the value is illegal for some other reason (for example a value outof range).
See Also:   Parameter.setValue(double,Unit)
See Also:   Parameter.doubleValue()



setValue
public void setValue(int value) throws InvalidParameterValueException(Code)
Set the parameter value as an integer.
Parameters:
  value - The parameter value.
throws:
  InvalidParameterValueException - if the integer type is inappropriate for this parameter,or if the value is illegal for some other reason (for example a value out of range).
See Also:   Parameter.intValue



setValue
public void setValue(boolean value) throws InvalidParameterValueException(Code)
Set the parameter value as a boolean.
Parameters:
  value - The parameter value.
throws:
  InvalidParameterValueException - if the boolean type is inappropriate for this parameter.
See Also:   Parameter.booleanValue



setValue
public void setValue(Object value) throws InvalidParameterValueException(Code)
Set the parameter value as an object. The object type is typically a Double , Integer , Boolean , String , URI , double[] or int[] .
Parameters:
  value - The parameter value.
throws:
  InvalidParameterValueException - if the type of value is inappropriatefor this parameter, or if the value is illegal for some other reason (for examplethe value is numeric and out of range).
See Also:   Parameter.getValue



setValue
public void setValue(double[] values, Unit unit) throws InvalidParameterValueException(Code)
Set the parameter value as an array of floating point and their associated unit.
Parameters:
  values - The parameter values.
Parameters:
  unit - The unit for the specified value.
throws:
  InvalidParameterValueException - if the floating point type is inappropriate for thisparameter, or if the value is illegal for some other reason (for example a value outof range).



stringValue
public String stringValue() throws InvalidParameterTypeException(Code)
Returns the string value of an operation parameter. A string value does not have an associated unit of measure. The string value represented by this parameter.
throws:
  InvalidParameterTypeException - if the value is not a string.
See Also:   Parameter.getValue
See Also:   Parameter.setValue(Object)



valueFile
public URI valueFile() throws InvalidParameterTypeException(Code)
Returns a reference to a file or a part of a file containing one or more parameter values. When referencing a part of a file, that file must contain multiple identified parts, such as an XML encoded document. Furthermore, the referenced file or part of a file can reference another part of the same or different files, as allowed in XML documents. The reference to a file containing parameter values.
throws:
  InvalidParameterTypeException - if the value is not a reference to a file or an URI.
See Also:   Parameter.getValue
See Also:   Parameter.setValue(Object)



wrap
static Integer wrap(int value)(Code)
Wraps the specified value in an Integer object. This method try to avoid object creation if the value is one of Parameter.CACHED_VALUES frequently used values .



wrap
static Double wrap(double value)(Code)
Wraps the specified value in an Double object. This method try to avoid object creation if the value is one of Parameter.CACHED_VALUES frequently used values .



Fields inherited from org.geotools.parameter.AbstractParameter
final GeneralParameterDescriptor descriptor(Code)(Java Doc)

Methods inherited from org.geotools.parameter.AbstractParameter
public Object clone()(Code)(Java Doc)
static void ensureNonNull(String name, Object object) throws IllegalArgumentException(Code)(Java Doc)
static void ensureNonNull(String name, Object[] array, int index) throws IllegalArgumentException(Code)(Java Doc)
static void ensureValidClass(Class valueClass, Object value) throws IllegalArgumentException(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
final protected String formatWKT(Formatter formatter)(Code)(Java Doc)
public GeneralParameterDescriptor getDescriptor()(Code)(Java Doc)
static String getName(GeneralParameterDescriptor descriptor)(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final public String toString()(Code)(Java Doc)
static IllegalStateException unitlessParameter(GeneralParameterDescriptor descriptor)(Code)(Java Doc)
protected void write(TableWriter table) throws IOException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.