|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.moml.unit.UnitExpr
public class UnitExpr
A UnitExpr contains UnitTerms.
Red (rowland) |
Red (rowland) |
Field Summary | |
---|---|
(package private) boolean |
_isFlat
|
(package private) java.util.Vector |
_uTerms
|
Constructor Summary | |
---|---|
UnitExpr()
Construct an empty (i.e. no UnitTerms) UnitExpr. |
|
UnitExpr(IOPort ioPort)
Construct a UnitTerm from an IOPort. |
Method Summary | |
---|---|
private void |
_flatten()
|
protected void |
_setUTerms(java.util.Vector uTerms)
|
void |
addUnitTerm(UnitTerm uTerm)
Add a UnitTerm to the expression. |
UnitExpr |
copy()
Create a copy of this UnitExpr. |
java.lang.String |
descriptiveForm()
The expression of the UnitExpr that is commonly used by humans. |
Unit |
getSingleUnit()
If this UnitExpr has one term and it is a Unit then return that Unit. |
java.util.Vector |
getUTerms()
Get the UnitTerms in this UnitExpr. |
UnitExpr |
invert()
Create a new UnitExpr that is the inverse of this UnitExpr. |
UnitExpr |
reduce()
Reduce a UnitExpr to produce a UnitExpr that has at most one Unit. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
boolean _isFlat
java.util.Vector _uTerms
Constructor Detail |
---|
public UnitExpr()
public UnitExpr(IOPort ioPort)
ioPort
- The IOPort.Method Detail |
---|
public void addUnitTerm(UnitTerm uTerm)
uTerm
- The UnitTerm.public UnitExpr copy()
public java.lang.String descriptiveForm()
descriptiveForm
in interface UnitPresentation
UnitPresentation.descriptiveForm()
public Unit getSingleUnit()
public java.util.Vector getUTerms()
public UnitExpr invert()
public UnitExpr reduce()
public java.lang.String toString()
toString
in interface UnitPresentation
toString
in class java.lang.Object
protected void _setUTerms(java.util.Vector uTerms)
private void _flatten()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |