Package ucar.nc2.iosp.gempak
Class GempakParameter
- java.lang.Object
-
- ucar.nc2.iosp.grid.GridParameter
-
- ucar.nc2.iosp.gempak.GempakParameter
-
public class GempakParameter extends GridParameter
Class which represents a GEMPAK parameter. Add on decimal scale and numeric flag to the superclass.
-
-
Field Summary
-
Fields inherited from class ucar.nc2.iosp.grid.GridParameter
cf_name, description, name, number, unit
-
-
Constructor Summary
Constructors Constructor Description GempakParameter(int number, String name, String description, String unit, int scale)Create a new numeric GEMPAK parameterGempakParameter(int number, String name, String description, String unit, int scale, boolean isNumeric)Create a new GEMPAK parameter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Check for equalityintgetDecimalScale()Get the decimal scalebooleangetIsNumeric()Get whether this is numeric or notinthashCode()Generate a hash code.voidsetIsNumeric(boolean yesorno)Set whether this is numeric or notStringtoString()Return a String representation of this object-
Methods inherited from class ucar.nc2.iosp.grid.GridParameter
getCFname, getDescription, getName, getNumber, getUnit, setDescription, setName, setNumber, setUnit
-
-
-
-
Constructor Detail
-
GempakParameter
public GempakParameter(int number, String name, String description, String unit, int scale)Create a new numeric GEMPAK parameter
-
GempakParameter
public GempakParameter(int number, String name, String description, String unit, int scale, boolean isNumeric)Create a new GEMPAK parameter- Parameters:
number- parameter numbername- namedescription- descriptionunit- of parameterscale- decimal (10E*) scaling factorisNumeric- flag for numeric
-
-
Method Detail
-
getDecimalScale
public int getDecimalScale()
Get the decimal scale- Returns:
- the decimal scale
-
getIsNumeric
public boolean getIsNumeric()
Get whether this is numeric or not- Returns:
- true if numeric
-
setIsNumeric
public void setIsNumeric(boolean yesorno)
Set whether this is numeric or not- Parameters:
yesorno- true if numeric
-
toString
public String toString()
Return a String representation of this object- Overrides:
toStringin classGridParameter- Returns:
- a String representation of this object
-
equals
public boolean equals(Object o)
Check for equality- Overrides:
equalsin classGridParameter- Parameters:
o- the object in question- Returns:
- true if has the same parameters
-
hashCode
public int hashCode()
Generate a hash code.- Overrides:
hashCodein classGridParameter- Returns:
- the hash code
-
-