Package openGql.grammar
Class SelectItem
- java.lang.Object
-
- openGql.grammar.SelectItem
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<SelectItem>
public class SelectItem extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<SelectItem>
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description Optional<java.lang.String>aliasstatic NameALIASName of theopenGql.grammar.SelectItem.aliasfield.ValueExpressionexpressionstatic NameEXPRESSIONName of theopenGql.grammar.SelectItem.expressionfield.static NameTYPE_Name of theopenGql.grammar.SelectItemtype.
-
Constructor Summary
Constructors Constructor Description SelectItem(ValueExpression expression, Optional<java.lang.String> alias)Constructs an immutableSelectItem.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(SelectItem other)booleanequals(java.lang.Object other)inthashCode()SelectItemwithAlias(Optional<java.lang.String> alias)Returns a copy of thisSelectItemwithaliasreplaced.SelectItemwithExpression(ValueExpression expression)Returns a copy of thisSelectItemwithexpressionreplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of theopenGql.grammar.SelectItemtype.
-
EXPRESSION
public static final Name EXPRESSION
Name of theopenGql.grammar.SelectItem.expressionfield.
-
ALIAS
public static final Name ALIAS
Name of theopenGql.grammar.SelectItem.aliasfield.
-
expression
public final ValueExpression expression
-
alias
public final Optional<java.lang.String> alias
-
-
Constructor Detail
-
SelectItem
public SelectItem(ValueExpression expression, Optional<java.lang.String> alias)
Constructs an immutableSelectItem.
-
-
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(SelectItem other)
- Specified by:
compareToin interfacejava.lang.Comparable<SelectItem>
-
withExpression
public SelectItem withExpression(ValueExpression expression)
Returns a copy of thisSelectItemwithexpressionreplaced.
-
withAlias
public SelectItem withAlias(Optional<java.lang.String> alias)
Returns a copy of thisSelectItemwithaliasreplaced.
-
-