Class GCTP.Requirements

java.lang.Object
noaa.coastwatch.util.GCTP.Requirements
Enclosing class:
GCTP

public static class GCTP.Requirements extends Object
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

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The maximum number of requirement parameters.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new requirements object from the specified list.
  • Method Summary

    Modifier and Type
    Method
    Description
    getDescription(int index)
    Gets the requirement description for the specified parameter index.
    int
    Gets the total number of required parameters.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • MAX_PARAMETERS

      public static final int MAX_PARAMETERS
      The maximum number of requirement parameters.
      See Also:
  • Constructor Details

    • Requirements

      public Requirements(String[] list)
      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 the GCTP.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

      public String getShortDescription(int index)
      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

      public String getDescription(int index)
      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

      public String getUnits(int index)
      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.