Class Unit
java.lang.Object
uk.ac.starlink.ttools.plot2.layer.Unit
- Direct Known Subclasses:
SolidAngleUnit
,TimeUnit
Defines a numeric factor corresponding to an extent on an axis.
Functionally, this is just a labelled double precision value,
but it has the semantics of a scaling factor along a plot axis.
- Since:
- 11 Jan 2018
- Author:
- Mark Taylor
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Description text to be included in XML documentation.double
Returns the extent along an axis in some externally-defined units represented by this object.getLabel()
Returns the label, suitable for user interface selection.Returns the unit symbol, suitable for use in unit metadata.Returns the name suitable for use in descriptive text.int
hashCode()
toString()
Returns the label.
-
Field Details
-
UNIT
Unit instance with value of unity.
-
-
Constructor Details
-
Unit
Constructor.- Parameters:
label
- text to appear in a selection interfacetextName
- text to appear in user-directed descriptive textsymbol
- text to appear as unit metadata, preferably compatible with the VOUnit standardextent
- distance along an axis in some externally-defined unitsdescription
- textual description to be included in XML
-
-
Method Details
-
getLabel
Returns the label, suitable for user interface selection.- Returns:
- label
-
getTextName
Returns the name suitable for use in descriptive text.- Returns:
- text name
-
getSymbol
Returns the unit symbol, suitable for use in unit metadata.- Returns:
- symbol, preferably VOUnit-compatible
-
getDescription
Description text to be included in XML documentation.- Returns:
- XML-friendly descriptive text
-
getExtent
public double getExtent()Returns the extent along an axis in some externally-defined units represented by this object.- Returns:
- extent
-
hashCode
public int hashCode() -
equals
-
toString
Returns the label.
-