Class PredicateTuple


  • public class PredicateTuple
    extends java.lang.Object
    An assertion defining the truth value of a predicate for a concrete list of arguments.

    For example, the predicate tuple p(b,0) = TRUE stipulates that predicate p, when given the arguments "b" (a constant) and 0, returns the value TRUE.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Predicate.PredicateArgument m_arguments
      The arguments of this predicate tuple
      protected java.lang.String m_name
      The name of the predicate this tuple defines
      protected boolean m_value
      The value associated to these arguments
    • Constructor Summary

      Constructors 
      Constructor Description
      PredicateTuple​(java.lang.String name, boolean value, java.lang.Object[] arguments)
      Creates a new predicate tuple
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getArgument​(int index)
      Retrieves the n-th argument of the tuple
      java.lang.String getName()
      Gets the name of the predicate this tuple defines
      static PredicateTuple toPredicateTuple​(java.lang.Object x)
      Creates a predicate tuple out of an object.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • m_value

        protected boolean m_value
        The value associated to these arguments
      • m_name

        protected java.lang.String m_name
        The name of the predicate this tuple defines
    • Constructor Detail

      • PredicateTuple

        public PredicateTuple​(java.lang.String name,
                              boolean value,
                              java.lang.Object[] arguments)
        Creates a new predicate tuple
        Parameters:
        name - The name of the predicate this tuple defines
        value - The value associated to the arguments
        arguments - The arguments of this predicate tuple
    • Method Detail

      • getName

        public java.lang.String getName()
        Gets the name of the predicate this tuple defines
        Returns:
        The name
      • getArgument

        public java.lang.Object getArgument​(int index)
        Retrieves the n-th argument of the tuple
        Parameters:
        index - The position to retrieve
        Returns:
        The value, or null if index is out of bounds
      • toPredicateTuple

        public static PredicateTuple toPredicateTuple​(java.lang.Object x)
        Creates a predicate tuple out of an object.
        Parameters:
        x - An array or an ordered collection of objects. Null elements and strings consisting only of whitespace, will be ignored when creating the tuple.
        Returns:
        The tuple
      • toString

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