Package MAKBPInterpreter.agents
Class AgentKnowledge
- java.lang.Object
-
- MAKBPInterpreter.agents.AgentKnowledge
-
-
Field Summary
Fields Modifier and Type Field Description protected Agent
agent
Associated agent.protected Formula
innerFormula
Inner formula.
-
Constructor Summary
Constructors Constructor Description AgentKnowledge(Agent agent, Formula formula)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(Formula otherFormula)
Returnstrue
if this formula contains the specified formula.boolean
equals(java.lang.Object other)
Verifies if the current object formula andother
formula are the same.boolean
evaluate(LogicAssignment assignment)
Evaluates a state that we passed into arguments.Agent
getAgent()
Gets the agent.Formula
getInnerFormula()
Gets the inner formula object.Formula
getNegation()
Returns the negation of the current formula.int
hashCode()
Formula
simplify()
Simplifies the logic formula.java.lang.String
toString()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
Description copied from interface:Formula
Verifies if the current object formula andother
formula are the same.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
simplify
public Formula simplify()
Description copied from interface:Formula
Simplifies the logic formula.
-
getNegation
public Formula getNegation()
Description copied from interface:Formula
Returns the negation of the current formula.- Specified by:
getNegation
in interfaceFormula
- Returns:
- negation of formula
-
contains
public boolean contains(Formula otherFormula)
Description copied from interface:Formula
Returnstrue
if this formula contains the specified formula.
-
getInnerFormula
public Formula getInnerFormula()
Gets the inner formula object.- Returns:
- inner formula object
- See Also:
innerFormula
-
evaluate
public boolean evaluate(LogicAssignment assignment) throws java.lang.Exception
Description copied from interface:Formula
Evaluates a state that we passed into arguments.
-
-