Package noaa.coastwatch.util
Class GCTP.Requirements
java.lang.Object
noaa.coastwatch.util.GCTP.Requirements
- Enclosing class:
- GCTP
The GCTP requirements class helps determine the various
parameters required for each projection. A requirements object
may be used to list the required parameters based on their
position in the parameters array.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The maximum number of requirement parameters. -
Constructor Summary
ConstructorDescriptionRequirements
(String[] list) Creates a new requirements object from the specified list. -
Method Summary
Modifier and TypeMethodDescriptiongetDescription
(int index) Gets the requirement description for the specified parameter index.int
Gets the total number of required parameters.getShortDescription
(int index) Gets the requirement short description for the specified parameter index.getUnits
(int index) Gets the requirement units for the specified parameter index.boolean
isRequired
(int index) Determines if the specified parameter is required.
-
Field Details
-
MAX_PARAMETERS
public static final int MAX_PARAMETERSThe maximum number of requirement parameters.- See Also:
-
-
Constructor Details
-
Requirements
Creates a new requirements object from the specified list. This constructor is meant for use by the GCTP class itself. Users should obtain a requirements object using theGCTP.getRequirements(int)
method.- Parameters:
list
- the array of requirements as descriptive strings. The array may contain empty string values for unrequired parameters indices. If the length of the array is less than the maximum number of required parameters, the remaining parameters are assumed to be unrequired.
-
-
Method Details
-
isRequired
public boolean isRequired(int index) Determines if the specified parameter is required.- Parameters:
index
- the parameter index in the range [0..MAX_PARAMETERS-1].- Returns:
- true if required or false if not.
-
getShortDescription
Gets the requirement short description for the specified parameter index. The short description is a variable name style code for the required parameter.- Parameters:
index
- the parameter index in the range [0..MAX_PARAMETERS-1].- Returns:
- the parameter short description, or "" if the parameter is not required.
-
getDescription
Gets the requirement description for the specified parameter index.- Parameters:
index
- the parameter index in the range [0..MAX_PARAMETERS-1].- Returns:
- the parameter description, or "" if the parameter is not required.
-
getUnits
Gets the requirement units for the specified parameter index.- Parameters:
index
- the parameter index in the range [0..MAX_PARAMETERS-1].- Returns:
- the parameter units, or "" if the parameter is not required.
-
getParameters
public int getParameters()Gets the total number of required parameters.
-