Package hydra.ext.lisp.syntax
Class CondClause
- java.lang.Object
-
- hydra.ext.lisp.syntax.CondClause
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<CondClause>
public class CondClause extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<CondClause>
A clause in a cond expression- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description ExpressionbodyThe result expressionstatic NameBODYExpressionconditionThe test conditionstatic NameCONDITIONstatic NameTYPE_
-
Constructor Summary
Constructors Constructor Description CondClause(Expression condition, Expression body)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(CondClause other)booleanequals(java.lang.Object other)inthashCode()CondClausewithBody(Expression body)CondClausewithCondition(Expression condition)
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
-
CONDITION
public static final Name CONDITION
-
BODY
public static final Name BODY
-
condition
public final Expression condition
The test condition
-
body
public final Expression body
The result expression
-
-
Constructor Detail
-
CondClause
public CondClause(Expression condition, Expression body)
-
-
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(CondClause other)
- Specified by:
compareToin interfacejava.lang.Comparable<CondClause>
-
withCondition
public CondClause withCondition(Expression condition)
-
withBody
public CondClause withBody(Expression body)
-
-