Package ptolemy.moml.unit
Interface UnitPresentation
-
- All Known Implementing Classes:
Unit
,UnitConstraints
,UnitEquation
,UnitExpr
,UnitInEquality
,UnitTerm
public interface UnitPresentation
The methods necessary to present Units, UnitConstraints, UnitExprs, etc. so that developers, and humans can understand the results generated by the system.- Since:
- Ptolemy II 8.0
- Version:
- $Id$
- Author:
- Rowland R Johnson
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (cxh)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
descriptiveForm()
This method generates the descriptive form.java.lang.String
toString()
-
-
-
Method Detail
-
descriptiveForm
java.lang.String descriptiveForm()
This method generates the descriptive form. In addition to the internal form used by the system Units, UnitConstraints, UnitExprs, etc. have a descriptive form that is used by humans. This method generates that form so that humans can easily understand the results generated by the system. For example, an internal representation of a Unit could be 4.1868E7*<2, 1, 1, 0, 0> and its descriptive form would be "calorie".The descriptive form is invariant across Unit Systems. That is, calorie is calorie regardless of the Unit System. But, the internal form may be 4.1868E7*<2, 1, 1, 0, 0> in one Unit System, and 1.0*<2, 1, 1, 0, 0> in another. Therefore the descriptive form is used as the external representation. This makes it possible to save a model under one Unit System, and then load it under a different Unit System.
- Returns:
- The descriptive form.
-
toString
java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-