Package openGql.grammar
Class PathPattern
- java.lang.Object
-
- openGql.grammar.PathPattern
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<PathPattern>
public class PathPattern extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<PathPattern>
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description PathPatternExpressionexpressionstatic NameEXPRESSIONName of theopenGql.grammar.PathPattern.expressionfield.Optional<PathPatternPrefix>prefixstatic NamePREFIXName of theopenGql.grammar.PathPattern.prefixfield.static NameTYPE_Name of theopenGql.grammar.PathPatterntype.static NameVARIABLE_DECLARATIONName of theopenGql.grammar.PathPattern.variableDeclarationfield.Optional<java.lang.String>variableDeclaration
-
Constructor Summary
Constructors Constructor Description PathPattern(Optional<java.lang.String> variableDeclaration, Optional<PathPatternPrefix> prefix, PathPatternExpression expression)Constructs an immutablePathPattern.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(PathPattern other)booleanequals(java.lang.Object other)inthashCode()PathPatternwithExpression(PathPatternExpression expression)Returns a copy of thisPathPatternwithexpressionreplaced.PathPatternwithPrefix(Optional<PathPatternPrefix> prefix)Returns a copy of thisPathPatternwithprefixreplaced.PathPatternwithVariableDeclaration(Optional<java.lang.String> variableDeclaration)Returns a copy of thisPathPatternwithvariableDeclarationreplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of theopenGql.grammar.PathPatterntype.
-
VARIABLE_DECLARATION
public static final Name VARIABLE_DECLARATION
Name of theopenGql.grammar.PathPattern.variableDeclarationfield.
-
PREFIX
public static final Name PREFIX
Name of theopenGql.grammar.PathPattern.prefixfield.
-
EXPRESSION
public static final Name EXPRESSION
Name of theopenGql.grammar.PathPattern.expressionfield.
-
variableDeclaration
public final Optional<java.lang.String> variableDeclaration
-
prefix
public final Optional<PathPatternPrefix> prefix
-
expression
public final PathPatternExpression expression
-
-
Constructor Detail
-
PathPattern
public PathPattern(Optional<java.lang.String> variableDeclaration, Optional<PathPatternPrefix> prefix, PathPatternExpression expression)
Constructs an immutablePathPattern.
-
-
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(PathPattern other)
- Specified by:
compareToin interfacejava.lang.Comparable<PathPattern>
-
withVariableDeclaration
public PathPattern withVariableDeclaration(Optional<java.lang.String> variableDeclaration)
Returns a copy of thisPathPatternwithvariableDeclarationreplaced.
-
withPrefix
public PathPattern withPrefix(Optional<PathPatternPrefix> prefix)
Returns a copy of thisPathPatternwithprefixreplaced.
-
withExpression
public PathPattern withExpression(PathPatternExpression expression)
Returns a copy of thisPathPatternwithexpressionreplaced.
-
-