Package com.orbit.parse
Record Class LookaheadExpr
java.lang.Object
java.lang.Record
com.orbit.parse.LookaheadExpr
- All Implemented Interfaces:
Expr
AST node representing a lookahead assertion (
(?=body) or (?!body)).
A positive lookahead (positive=true) succeeds when body matches at
the current position without consuming any input. A negative lookahead
(positive=false) succeeds when body does NOT match.
Instances are immutable and safe for use by multiple concurrent threads.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbody()Returns the value of thebodyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanpositive()Returns the value of thepositiverecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LookaheadExpr
Creates a newLookaheadExpr.
-
-
Method Details
-
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. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
body
Returns the value of thebodyrecord component.- Returns:
- the value of the
bodyrecord component
-
positive
public boolean positive()Returns the value of thepositiverecord component.- Returns:
- the value of the
positiverecord component
-