ptolemy.moml.unit
Class UnitConstraint

java.lang.Object
  extended by ptolemy.moml.unit.UnitConstraint
Direct Known Subclasses:
UnitEquation, UnitInEquality

public abstract class UnitConstraint
extends java.lang.Object

Since:
Ptolemy II 8.0
Version:
$Id: UnitConstraint.java 57044 2010-01-27 22:41:05Z cxh $
Author:
Rowland R Johnson
Accepted Rating:
Red (rowland)
Proposed Rating:
Red (rowland)

Field Summary
(package private)  UnitExpr _lhs
           
(package private)  java.lang.String _operator
           
(package private)  UnitExpr _rhs
           
(package private)  NamedObj _source
           
 
Constructor Summary
UnitConstraint(java.lang.String string)
           
UnitConstraint(UnitExpr lhs, java.lang.String operator, UnitExpr rhs)
           
 
Method Summary
 java.lang.String descriptiveForm()
           
 UnitExpr getLhs()
          Get the left hand side.
 java.lang.String getOperator()
           
 UnitExpr getRhs()
          Get the right hand side.
 NamedObj getSource()
          Get the source of this equation.
 void setLhs(UnitExpr expr)
           
 void setRhs(UnitExpr expr)
           
 void setSource(NamedObj source)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_lhs

UnitExpr _lhs

_rhs

UnitExpr _rhs

_operator

java.lang.String _operator

_source

NamedObj _source
Constructor Detail

UnitConstraint

public UnitConstraint(java.lang.String string)
Parameters:
string -

UnitConstraint

public UnitConstraint(UnitExpr lhs,
                      java.lang.String operator,
                      UnitExpr rhs)
Parameters:
lhs -
operator -
rhs -
Method Detail

descriptiveForm

public java.lang.String descriptiveForm()

getLhs

public UnitExpr getLhs()
Get the left hand side.

Returns:
The left hand side.

getOperator

public java.lang.String getOperator()
Returns:
The operator.

getRhs

public UnitExpr getRhs()
Get the right hand side.

Returns:
The right hand side.

getSource

public NamedObj getSource()
Get the source of this equation.

Returns:
The source of this equation.

setLhs

public void setLhs(UnitExpr expr)

setRhs

public void setRhs(UnitExpr expr)

setSource

public void setSource(NamedObj source)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object