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 aStatementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconditionrecord component.doBlock()Returns the value of thedoBlockrecord component.static StatementElse(Statement.Op op, String value) static Statementstatic StatementElseIf(String expression, Statement.Op op, String value) static Statementfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static StatementIf(String expression, Statement.Op op, String value) static StatementbooleanisBlock()keyword()Returns the value of thekeywordrecord component.Returns the value of theoperationrecord component.toString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
Statement
public Statement(Statement.Keyword keyword, String condition, Statement.Op operation, String value, List<Statement> doBlock) Creates an instance of aStatementrecord class.- Parameters:
keyword- the value for thekeywordrecord componentcondition- the value for theconditionrecord componentoperation- the value for theoperationrecord componentvalue- the value for thevaluerecord componentdoBlock- the value for thedoBlockrecord component
-
-
Method Details
-
isBlock
public boolean isBlock() -
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
doBlock
Returns the value of thedoBlockrecord component.- Returns:
- the value of the
doBlockrecord 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 thekeywordrecord component.- Returns:
- the value of the
keywordrecord component
-
condition
Returns the value of theconditionrecord component.- Returns:
- the value of the
conditionrecord component
-
operation
Returns the value of theoperationrecord component.- Returns:
- the value of the
operationrecord component
-