Class ConceptToken

  • All Implemented Interfaces:
    PartiallyOrderedToken

    public class ConceptToken
    extends ObjectToken
    implements PartiallyOrderedToken
    A token that contains an ontology concept. Concepts are partially ordered immutable values that belong to an ontology. Most of the functionality of this token class is is simply inherited from Concept. Concept
    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Ben Lickly
    Pt.AcceptedRating:
    Red (blickly)
    Pt.ProposedRating:
    Red (blickly)
    • Constructor Detail

    • Method Detail

      • conceptValue

        public Concept conceptValue()
        Return the concept encapsulated by this token.
        Returns:
        The concept value.
      • isEqualTo

        public BooleanToken isEqualTo​(Token rightArgument)
        Compare this ConceptToken to the given argument, and return true if they refer to the same concept in the same lattice. If either is null, return false.
        Overrides:
        isEqualTo in class ObjectToken
        Parameters:
        rightArgument - The argument.
        Returns:
        true if the values are the same Concept, or false otherwise.
      • isLessThan

        public BooleanToken isLessThan​(PartiallyOrderedToken rightArgument)
                                throws IllegalActionException
        Check whether the value of this token is strictly less than that of the argument token. Note that ontologies are only partial orders, so !(a < b) does not imply (a ≥ b).
        Specified by:
        isLessThan in interface PartiallyOrderedToken
        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 argument token and this token are of incomparable types, or are concepts from different ontologies.
      • toString

        public java.lang.String toString()
        Return the value of this concept token as a string.
        Overrides:
        toString in class ObjectToken
        Returns:
        The name of the concept contained by this token as a string value.