Package hydra.ext.haskell.ast
Class Alternative
- java.lang.Object
-
- hydra.ext.haskell.ast.Alternative
-
- All Implemented Interfaces:
java.io.Serializable
public class Alternative extends java.lang.Object implements java.io.Serializable
A pattern-matching alternative- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description Opt<LocalBindings>
binds
static Name
FIELD_NAME_BINDS
static Name
FIELD_NAME_PATTERN
static Name
FIELD_NAME_RHS
Pattern
pattern
CaseRhs
rhs
static Name
TYPE_NAME
-
Constructor Summary
Constructors Constructor Description Alternative(Pattern pattern, CaseRhs rhs, Opt<LocalBindings> binds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
int
hashCode()
Alternative
withBinds(Opt<LocalBindings> binds)
Alternative
withPattern(Pattern pattern)
Alternative
withRhs(CaseRhs rhs)
-
-
-
Field Detail
-
TYPE_NAME
public static final Name TYPE_NAME
-
FIELD_NAME_PATTERN
public static final Name FIELD_NAME_PATTERN
-
FIELD_NAME_RHS
public static final Name FIELD_NAME_RHS
-
FIELD_NAME_BINDS
public static final Name FIELD_NAME_BINDS
-
pattern
public final Pattern pattern
-
rhs
public final CaseRhs rhs
-
binds
public final Opt<LocalBindings> binds
-
-
Constructor Detail
-
Alternative
public Alternative(Pattern pattern, CaseRhs rhs, Opt<LocalBindings> binds)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
withPattern
public Alternative withPattern(Pattern pattern)
-
withRhs
public Alternative withRhs(CaseRhs rhs)
-
withBinds
public Alternative withBinds(Opt<LocalBindings> binds)
-
-