Record Class ScriptComments.StatementComments
java.lang.Object
java.lang.Record
com.darkcollective.relix.lang.ast.ScriptComments.StatementComments
- Record Components:
blankLineBefore- whether a blank line separated this statement, with the comments before it, from what came beforebefore- comments on the lines before the statement, after the one before itinside- comments between the statement's first token and its;, such as a comment inside its algebraafter- comments after its;, on the same line
- Enclosing class:
ScriptComments
public static record ScriptComments.StatementComments(boolean blankLineBefore, List<Comment> before, List<Comment> inside, List<Comment> after)
extends Record
The comments placed by one statement, and whether a blank line came before it.
- Since:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ScriptComments.StatementCommentsNo comments, and no blank line. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionafter()Returns the value of theafterrecord component.before()Returns the value of thebeforerecord component.booleanReturns the value of theblankLineBeforerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.inside()Returns the value of theinsiderecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
NONE
No comments, and no blank line.
-
-
Constructor Details
-
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 '=='. -
blankLineBefore
public boolean blankLineBefore()Returns the value of theblankLineBeforerecord component.- Returns:
- the value of the
blankLineBeforerecord component
-
before
Returns the value of thebeforerecord component.- Returns:
- the value of the
beforerecord component
-
inside
Returns the value of theinsiderecord component.- Returns:
- the value of the
insiderecord component
-
after
Returns the value of theafterrecord component.- Returns:
- the value of the
afterrecord component
-