Package hydra.error.core
Class ConstantConditionError
- java.lang.Object
-
- hydra.error.core.ConstantConditionError
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ConstantConditionError>
public class ConstantConditionError extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<ConstantConditionError>
An application of ifElse where the condition is a literal boolean, creating a dead branch (optional)- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description SubtermPathlocationThe path to the constant condition within the termstatic NameLOCATIONName of thehydra.error.core.ConstantConditionError.locationfield.static NameTYPE_Name of thehydra.error.core.ConstantConditionErrortype.java.lang.BooleanvalueThe constant boolean value of the conditionstatic NameVALUEName of thehydra.error.core.ConstantConditionError.valuefield.
-
Constructor Summary
Constructors Constructor Description ConstantConditionError(SubtermPath location, java.lang.Boolean value)Constructs an immutableConstantConditionError.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(ConstantConditionError other)booleanequals(java.lang.Object other)inthashCode()ConstantConditionErrorwithLocation(SubtermPath location)Returns a copy of thisConstantConditionErrorwithlocationreplaced.ConstantConditionErrorwithValue(java.lang.Boolean value)Returns a copy of thisConstantConditionErrorwithvaluereplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of thehydra.error.core.ConstantConditionErrortype.
-
LOCATION
public static final Name LOCATION
Name of thehydra.error.core.ConstantConditionError.locationfield.
-
VALUE
public static final Name VALUE
Name of thehydra.error.core.ConstantConditionError.valuefield.
-
location
public final SubtermPath location
The path to the constant condition within the term
-
value
public final java.lang.Boolean value
The constant boolean value of the condition
-
-
Constructor Detail
-
ConstantConditionError
public ConstantConditionError(SubtermPath location, java.lang.Boolean value)
Constructs an immutableConstantConditionError.- Parameters:
location- The path to the constant condition within the termvalue- The constant boolean value of the condition
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
compareTo
public int compareTo(ConstantConditionError other)
- Specified by:
compareToin interfacejava.lang.Comparable<ConstantConditionError>
-
withLocation
public ConstantConditionError withLocation(SubtermPath location)
Returns a copy of thisConstantConditionErrorwithlocationreplaced.
-
withValue
public ConstantConditionError withValue(java.lang.Boolean value)
Returns a copy of thisConstantConditionErrorwithvaluereplaced.
-
-