Class PropertyNotEqual

All Implemented Interfaces:
IGroundable, Serializable, Cloneable

public class PropertyNotEqual extends PropertyCondition
Test that compares if a property is different from a given value
Author:
Joao Dias
See Also:
  • Constructor Details

    • PropertyNotEqual

      public PropertyNotEqual(Name name, Name value, Symbol ToM)
      Creates a new PropertyTest of Type NotEqual
      Parameters:
      name - - the PropertyTest's name
      value - - the PropertyTest's value
    • PropertyNotEqual

      protected PropertyNotEqual(PropertyNotEqual pNE)
  • Method Details

    • clone

      public Object clone()
      Clones this PropertyTest, returning an equal copy. If this clone is changed afterwards, the original object remains the same.
      Overrides:
      clone in class PropertyCondition
      Returns:
      The PropertyTest's copy.
    • CheckCondition

      public boolean CheckCondition(AgentModel am)
      Checks if the Property Condition is verified in the agent's Memory (KB + AM)
      Overrides:
      CheckCondition in class PropertyCondition
      Returns:
      true if the condition is verified, false otherwise
      See Also:
    • GetValidBindings

      public ArrayList<SubstitutionSet> GetValidBindings(AgentModel am)
      This method finds all the possible sets of Substitutions that applied to the condition will make it valid (true) according to the current Memory
      Overrides:
      GetValidBindings in class Condition
      Returns:
      A list with all SubstitutionsSets that make the condition valid
      See Also:
    • GetValidInequalities

      public ArrayList<SubstitutionSet> GetValidInequalities(AgentModel am)
      This method finds all the possible sets of Inequalities that that result from the condition. In order for the method to work properly, at least one part of the NotEqual Condition must be grounded. i.e, we cannot determine inequalities between [X] != [Y]
      Returns:
      A list with all SubstitutionSets (with inequalities inside) that if they are verified, the NotEqualCondition is also verified
    • GetValueBindings

      protected ArrayList<Substitution> GetValueBindings()
    • Print

      public void Print()
      Prints the PropertyTest to the Standard Output
      Overrides:
      Print in class PropertyCondition
    • toString

      public String toString()
      Converts the PropertyTest to a String
      Overrides:
      toString in class Object
      Returns:
      the Converted String