Package rife.datastructures
Record Class DocumentPosition
java.lang.Object
java.lang.Record
rife.datastructures.DocumentPosition
-
Constructor Summary
ConstructorDescriptionDocumentPosition
(String lineContent, int line, int column, int marking) Creates an instance of aDocumentPosition
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
column()
Returns the value of thecolumn
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
line()
Returns the value of theline
record component.Returns the value of thelineContent
record component.int
marking()
Returns the value of themarking
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
DocumentPosition
Creates an instance of aDocumentPosition
record class.- Parameters:
lineContent
- the value for thelineContent
record componentline
- the value for theline
record componentcolumn
- the value for thecolumn
record componentmarking
- the value for themarking
record component
-
-
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 '=='. -
lineContent
Returns the value of thelineContent
record component.- Returns:
- the value of the
lineContent
record component
-
line
public int line()Returns the value of theline
record component.- Returns:
- the value of the
line
record component
-
column
public int column()Returns the value of thecolumn
record component.- Returns:
- the value of the
column
record component
-
marking
public int marking()Returns the value of themarking
record component.- Returns:
- the value of the
marking
record component
-