Record Class XSFormatWord
java.lang.Object
java.lang.Record
com.io7m.xstructural.vanilla.internal.format.XSFormatWord
- Record Components:
spaceBefore- Whether there was whitespace before this word in the sourcetext- The word text
- All Implemented Interfaces:
XSFormatItemType
public record XSFormatWord(boolean spaceBefore, String text)
extends Record
implements XSFormatItemType
A word: a maximal run of non-whitespace text.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thespaceBeforerecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
XSFormatWord
Constructor.
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
spaceBefore
public boolean spaceBefore()Returns the value of thespaceBeforerecord component.- Specified by:
spaceBeforein interfaceXSFormatItemType- Returns:
- the value of the
spaceBeforerecord component
-
text
-