Package com.graphhopper.json
Record Class Statement
java.lang.Object
java.lang.Record
com.graphhopper.json.Statement
public record Statement(Statement.Keyword keyword, String condition, Statement.Op operation, String value, List<Statement> doBlock)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionStatement
(Statement.Keyword keyword, String condition, Statement.Op operation, String value, List<Statement> doBlock) Creates an instance of aStatement
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecondition
record component.doBlock()
Returns the value of thedoBlock
record component.static Statement
Else
(Statement.Op op, String value) static Statement
static Statement
ElseIf
(String expression, Statement.Op op, String value) static Statement
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.static Statement
If
(String expression, Statement.Op op, String value) static Statement
boolean
isBlock()
keyword()
Returns the value of thekeyword
record component.Returns the value of theoperation
record component.toString()
Returns a string representation of this record class.value()
Returns the value of thevalue
record component.
-
Constructor Details
-
Statement
public Statement(Statement.Keyword keyword, String condition, Statement.Op operation, String value, List<Statement> doBlock) Creates an instance of aStatement
record class.- Parameters:
keyword
- the value for thekeyword
record componentcondition
- the value for thecondition
record componentoperation
- the value for theoperation
record componentvalue
- the value for thevalue
record componentdoBlock
- the value for thedoBlock
record component
-
-
Method Details
-
isBlock
public boolean isBlock() -
value
Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-
doBlock
Returns the value of thedoBlock
record component.- Returns:
- the value of the
doBlock
record component
-
toPrettyString
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
If
-
If
-
ElseIf
-
ElseIf
-
Else
-
Else
-
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
keyword
Returns the value of thekeyword
record component.- Returns:
- the value of the
keyword
record component
-
condition
Returns the value of thecondition
record component.- Returns:
- the value of the
condition
record component
-
operation
Returns the value of theoperation
record component.- Returns:
- the value of the
operation
record component
-