Package ptolemy.data
Interface PartiallyOrderedToken
-
- All Known Implementing Classes:
BooleanToken
,ComplexToken
,ConceptToken
,ConcreteScalarToken
,DateToken
,DoubleToken
,FixToken
,FloatToken
,IntToken
,LongToken
,PetiteToken
,ScalarToken
,ShortToken
,SmoothToken
,UnsignedByteToken
,UnsizedFixToken
public interface PartiallyOrderedToken
An interface for tokens that can be partially ordered.The default implementation of visitRelationalNode
ParseTreeEvaluator.visitRelationalNode(ASTPtRelationalNode)
uses this interface, so any tokens that implement this interface can be used with the inequality operators (<, ≤, >, and ≥) in the Ptolemy expression language.- Since:
- Ptolemy II 10.0
- Author:
- Ben Lickly
- Pt.AcceptedRating:
- Red (blickly)
- Pt.ProposedRating:
- Red (blickly)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BooleanToken
isLessThan(PartiallyOrderedToken rightArgument)
Check whether the value of this token is strictly less than that of the argument token.
-
-
-
Method Detail
-
isLessThan
BooleanToken isLessThan(PartiallyOrderedToken rightArgument) throws IllegalActionException
Check whether the value of this token is strictly less than that of the argument token. Only a partial order is assumed, so !(a < b) need not imply (a ≥ b).- Parameters:
rightArgument
- The token on greater than side of the inequality.- Returns:
- BooleanToken.TRUE, if this token is less than the argument token. BooleanToken.FALSE, otherwise.
- Throws:
IllegalActionException
- If the tokens are incomparable.
-
-