Package opennlp.tools.formats.ad
Record Class ADMetadata.IdSpans
java.lang.Object
java.lang.Record
opennlp.tools.formats.ad.ADMetadata.IdSpans
- Enclosing class:
ADMetadata
private static record ADMetadata.IdSpans(int textStart, int textEnd, int paragraphStart, int paragraphEnd)
extends Record
Where the digit runs of the two ids lie in the metadata, each as an inclusive start and
an exclusive end.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theparagraphEndrecord component.private final intThe field for theparagraphStartrecord component.private final intThe field for thetextEndrecord component.private final intThe field for thetextStartrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateIdSpans(int textStart, int textEnd, int paragraphStart, int paragraphEnd) Creates an instance of aIdSpansrecord class. -
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.intReturns the value of theparagraphEndrecord component.intReturns the value of theparagraphStartrecord component.inttextEnd()Returns the value of thetextEndrecord component.intReturns the value of thetextStartrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
textStart
private final int textStartThe field for thetextStartrecord component. -
textEnd
private final int textEndThe field for thetextEndrecord component. -
paragraphStart
private final int paragraphStartThe field for theparagraphStartrecord component. -
paragraphEnd
private final int paragraphEndThe field for theparagraphEndrecord component.
-
-
Constructor Details
-
IdSpans
private IdSpans(int textStart, int textEnd, int paragraphStart, int paragraphEnd) Creates an instance of aIdSpansrecord class.- Parameters:
textStart- the value for thetextStartrecord componenttextEnd- the value for thetextEndrecord componentparagraphStart- the value for theparagraphStartrecord componentparagraphEnd- the value for theparagraphEndrecord 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. All components in this record class are compared with '=='. -
textStart
public int textStart()Returns the value of thetextStartrecord component.- Returns:
- the value of the
textStartrecord component
-
textEnd
public int textEnd()Returns the value of thetextEndrecord component.- Returns:
- the value of the
textEndrecord component
-
paragraphStart
public int paragraphStart()Returns the value of theparagraphStartrecord component.- Returns:
- the value of the
paragraphStartrecord component
-
paragraphEnd
public int paragraphEnd()Returns the value of theparagraphEndrecord component.- Returns:
- the value of the
paragraphEndrecord component
-