Package MAKBPInterpreter.agents
Class EverybodyKnowledge
- java.lang.Object
-
- MAKBPInterpreter.agents.EverybodyKnowledge
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<Agent>agentsAgent set where each agent knows the associated formula.protected FormulainnerFormulaCommon formula knows by all the agents.
-
Constructor Summary
Constructors Constructor Description EverybodyKnowledge(Formula formula, java.util.Set<Agent> agents)Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(Formula otherFormula)Returnstrueif this formula contains the specified formula.booleanequals(java.lang.Object other)Verifies if the current object formula andotherformula are the same.booleanevaluate(LogicAssignment assignment)Evaluates a state that we passed into arguments.java.util.Set<Agent>getAgents()Gets the agent set where each agent knows the associated formula.FormulagetInnerFormula()Gets the inner formula object.FormulagetNegation()Returns the negation of the current formula.inthashCode()Formulasimplify()Simplifies the logic formula.
-
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
Description copied from interface:FormulaVerifies if the current object formula andotherformula are the same.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
simplify
public Formula simplify()
Description copied from interface:FormulaSimplifies the logic formula.
-
getNegation
public Formula getNegation()
Description copied from interface:FormulaReturns the negation of the current formula.- Specified by:
getNegationin interfaceFormula- Returns:
- negation of formula
-
contains
public boolean contains(Formula otherFormula)
Description copied from interface:FormulaReturnstrueif this formula contains the specified formula.
-
getInnerFormula
public Formula getInnerFormula()
Gets the inner formula object.- Returns:
- inner formula object
- See Also:
innerFormula
-
getAgents
public java.util.Set<Agent> getAgents()
Gets the agent set where each agent knows the associated formula.- Returns:
- agent set
-
evaluate
public boolean evaluate(LogicAssignment assignment) throws java.lang.Exception
Description copied from interface:FormulaEvaluates a state that we passed into arguments.
-
-