Record Class SyTextLocationType.SyCharacter
java.lang.Object
java.lang.Record
com.io7m.jsycamore.api.text.SyTextLocationType.SyCharacter
- Record Components:
isLeadingEdge-trueif the location is at the leading edge of a charactercenterIndex- The center indexcenterCharacter- The character at the center indexinsertionIndex- The insertion indexinsertionCharacter- The character at the insertion index
- Enclosing interface:
SyTextLocationType
public static record SyTextLocationType.SyCharacter(boolean isLeadingEdge, int centerIndex, char centerCharacter, int insertionIndex, char insertionCharacter)
extends Record
Information about a character at a location.
-
Constructor Summary
ConstructorsConstructorDescriptionSyCharacter(boolean isLeadingEdge, int centerIndex, char centerCharacter, int insertionIndex, char insertionCharacter) Creates an instance of aSyCharacterrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncharReturns the value of thecenterCharacterrecord component.intReturns the value of thecenterIndexrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.charReturns the value of theinsertionCharacterrecord component.intReturns the value of theinsertionIndexrecord component.booleanReturns the value of theisLeadingEdgerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SyCharacter
public SyCharacter(boolean isLeadingEdge, int centerIndex, char centerCharacter, int insertionIndex, char insertionCharacter) Creates an instance of aSyCharacterrecord class.- Parameters:
isLeadingEdge- the value for theisLeadingEdgerecord componentcenterIndex- the value for thecenterIndexrecord componentcenterCharacter- the value for thecenterCharacterrecord componentinsertionIndex- the value for theinsertionIndexrecord componentinsertionCharacter- the value for theinsertionCharacterrecord component
-
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
isLeadingEdge
public boolean isLeadingEdge()Returns the value of theisLeadingEdgerecord component.- Returns:
- the value of the
isLeadingEdgerecord component
-
centerIndex
public int centerIndex()Returns the value of thecenterIndexrecord component.- Returns:
- the value of the
centerIndexrecord component
-
centerCharacter
public char centerCharacter()Returns the value of thecenterCharacterrecord component.- Returns:
- the value of the
centerCharacterrecord component
-
insertionIndex
public int insertionIndex()Returns the value of theinsertionIndexrecord component.- Returns:
- the value of the
insertionIndexrecord component
-
insertionCharacter
public char insertionCharacter()Returns the value of theinsertionCharacterrecord component.- Returns:
- the value of the
insertionCharacterrecord component
-