Class ConditionJustification
java.lang.Object
edu.tufts.hrilab.action.justification.Justification
edu.tufts.hrilab.action.justification.ConditionJustification
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConditionJustification
(boolean value) Constructor indicating true/false without indicating a particular condition.ConditionJustification
(boolean value, Predicate condition) Constructor indicating the logical truth value of the condition predicate, as well as the overall value of the justification.Constructor indicating the logical truth value of the condition predicate, as well as the overall value of the justification. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get all the possible bindings for each condition within the justificationgetBindings
(Variable argument) Get the bindings for a specific argumentGet the conditions which do not hold.Get the bindings for the failed conditions.Get the conditions which hold in the environment, but cause the failure.Get the entire list of conditions within the justificationtoString()
Methods inherited from class edu.tufts.hrilab.action.justification.Justification
getStep, getValue, setStep, setValue
-
Constructor Details
-
ConditionJustification
public ConditionJustification(boolean value) Constructor indicating true/false without indicating a particular condition.- Parameters:
value
-
-
ConditionJustification
Constructor indicating the logical truth value of the condition predicate, as well as the overall value of the justification.- Parameters:
value
-condition
-
-
ConditionJustification
public ConditionJustification(boolean value, Predicate condition, List<Map<Variable, Symbol>> bindings) Constructor indicating the logical truth value of the condition predicate, as well as the overall value of the justification. The bindings contain binding options for any free-variables in the condition predicate.- Parameters:
value
-condition
-bindings
-
-
-
Method Details
-
getPredicates
Description copied from class:Justification
Get the entire list of conditions within the justification- Specified by:
getPredicates
in classJustification
- Returns:
- list of conditions
-
getBindings
Description copied from class:Justification
Get all the possible bindings for each condition within the justification- Specified by:
getBindings
in classJustification
- Returns:
- list of the bindings for each condition
-
getFailedConditions
Description copied from class:Justification
Get the conditions which do not hold. This will attempt to bind any free-variables in the failed conditions in the returned values. If multiple binding options exist, a single condition can produce multiple bound conditions.- Specified by:
getFailedConditions
in classJustification
- Returns:
- list of failed predicates
-
getFailureReason
Description copied from class:Justification
Get the conditions which hold in the environment, but cause the failure. This will attempt to bind any free-variables in the failed conditions in the returned values. If multiple binding options exist, a single condition can produce multiple bound conditions.- Specified by:
getFailureReason
in classJustification
- Returns:
- list of predicates which hold in the environment
-
getFailureBindings
Description copied from class:Justification
Get the bindings for the failed conditions.- Specified by:
getFailureBindings
in classJustification
- Returns:
- list of the bindings for each failed condition
-
getBindings
Description copied from class:Justification
Get the bindings for a specific argument- Specified by:
getBindings
in classJustification
- Parameters:
argument
- the arg to find bindings for- Returns:
- set of bindings for the argument
-
toString
-
equals
- Overrides:
equals
in classJustification
-