Class RelationType


  • public final class RelationType
    extends java.lang.Object
    A static class contains a list of types for relation node. There are six different types:
     INVALID
     TRUE
     FALSE
     EQUAL_INEQUAL
     LESS_THAN
     GREATER_THAN
     

    For a leaf node evaluated as a boolean token, its relationType is decided by the boolean value of the result boolean token: TRUE for true and FALSE for false.

    For a relation node, (scalarLeft relationOperator scalarRight), the relationType depends on the relationOperator. If the relationOperator is '==' or '!=', the relationType can be EQUAL_INEQUAL indicating the two scalars equal or not equal; the relation type is LESS_THAN to indicate that the left scalar is less than the right one, and GREATER_THAN to indicate left scalar is bigger than the right one. For the other kinds of relation operators, the relationType is decided by the boolean value of the evaluation result, i.e., TRUE for true and FALSE for false.

    The INVALID type is for a relation not evaluated yet.

    Since:
    Ptolemy II 8.0
    Version:
    $Id$
    Author:
    Haiyang Zheng
    Pt.AcceptedRating:
    Red (hyzheng)
    Pt.ProposedRating:
    Yellow (hyzheng)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int EQUAL_INEQUAL
      Relation type a relation node that is evaluated to be true while the relation operation is not equal or inequal.
      static int FALSE
      Relation type a relation node that is evaluated to be fale while the relation operation is not equal or inequal.
      static int GREATER_THAN
      Relation type a relation node that is evaluated to be false and the left token is greater than the right token, while the relation operation is not equal or inequal.
      static int INVALID
      Relation type a relation node that is not evaluated.
      static int LESS_THAN
      Relation type a relation node that is evaluated to be false and the left token is less than the right token, while the relation operation is not equal or inequal.
      static int TRUE
      Relation type a relation node that is evaluated to be true while the relation operation is not equal or inequal.
    • Constructor Summary

      Constructors 
      Constructor Description
      RelationType()  
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • INVALID

        public static final int INVALID
        Relation type a relation node that is not evaluated.
        See Also:
        Constant Field Values
      • TRUE

        public static final int TRUE
        Relation type a relation node that is evaluated to be true while the relation operation is not equal or inequal.
        See Also:
        Constant Field Values
      • FALSE

        public static final int FALSE
        Relation type a relation node that is evaluated to be fale while the relation operation is not equal or inequal.
        See Also:
        Constant Field Values
      • EQUAL_INEQUAL

        public static final int EQUAL_INEQUAL
        Relation type a relation node that is evaluated to be true while the relation operation is not equal or inequal.
        See Also:
        Constant Field Values
      • LESS_THAN

        public static final int LESS_THAN
        Relation type a relation node that is evaluated to be false and the left token is less than the right token, while the relation operation is not equal or inequal.
        See Also:
        Constant Field Values
      • GREATER_THAN

        public static final int GREATER_THAN
        Relation type a relation node that is evaluated to be false and the left token is greater than the right token, while the relation operation is not equal or inequal.
        See Also:
        Constant Field Values
    • Constructor Detail

      • RelationType

        public RelationType()