Package openGql.grammar
Class SimpleCase
- java.lang.Object
-
- openGql.grammar.SimpleCase
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<SimpleCase>
public class SimpleCase extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<SimpleCase>
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static NameCASE_OPERANDName of theopenGql.grammar.SimpleCase.caseOperandfield.CaseOperandcaseOperandstatic NameELSE_CLAUSEName of theopenGql.grammar.SimpleCase.elseClausefield.Optional<Result>elseClausestatic NameTYPE_Name of theopenGql.grammar.SimpleCasetype.static NameWHEN_CLAUSESName of theopenGql.grammar.SimpleCase.whenClausesfield.java.util.List<SimpleWhenClause>whenClauses
-
Constructor Summary
Constructors Constructor Description SimpleCase(CaseOperand caseOperand, java.util.List<SimpleWhenClause> whenClauses, Optional<Result> elseClause)Constructs an immutableSimpleCase.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(SimpleCase other)booleanequals(java.lang.Object other)inthashCode()SimpleCasewithCaseOperand(CaseOperand caseOperand)Returns a copy of thisSimpleCasewithcaseOperandreplaced.SimpleCasewithElseClause(Optional<Result> elseClause)Returns a copy of thisSimpleCasewithelseClausereplaced.SimpleCasewithWhenClauses(java.util.List<SimpleWhenClause> whenClauses)Returns a copy of thisSimpleCasewithwhenClausesreplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of theopenGql.grammar.SimpleCasetype.
-
CASE_OPERAND
public static final Name CASE_OPERAND
Name of theopenGql.grammar.SimpleCase.caseOperandfield.
-
WHEN_CLAUSES
public static final Name WHEN_CLAUSES
Name of theopenGql.grammar.SimpleCase.whenClausesfield.
-
ELSE_CLAUSE
public static final Name ELSE_CLAUSE
Name of theopenGql.grammar.SimpleCase.elseClausefield.
-
caseOperand
public final CaseOperand caseOperand
-
whenClauses
public final java.util.List<SimpleWhenClause> whenClauses
-
-
Constructor Detail
-
SimpleCase
public SimpleCase(CaseOperand caseOperand, java.util.List<SimpleWhenClause> whenClauses, Optional<Result> elseClause)
Constructs an immutableSimpleCase.
-
-
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(SimpleCase other)
- Specified by:
compareToin interfacejava.lang.Comparable<SimpleCase>
-
withCaseOperand
public SimpleCase withCaseOperand(CaseOperand caseOperand)
Returns a copy of thisSimpleCasewithcaseOperandreplaced.
-
withWhenClauses
public SimpleCase withWhenClauses(java.util.List<SimpleWhenClause> whenClauses)
Returns a copy of thisSimpleCasewithwhenClausesreplaced.
-
withElseClause
public SimpleCase withElseClause(Optional<Result> elseClause)
Returns a copy of thisSimpleCasewithelseClausereplaced.
-
-