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

    Fields
    Modifier and Type
    Field
    Description
    private final int
    The field for the paragraphEnd record component.
    private final int
    The field for the paragraphStart record component.
    private final int
    The field for the textEnd record component.
    private final int
    The field for the textStart record component.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    IdSpans(int textStart, int textEnd, int paragraphStart, int paragraphEnd)
    Creates an instance of a IdSpans record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the paragraphEnd record component.
    int
    Returns the value of the paragraphStart record component.
    int
    Returns the value of the textEnd record component.
    int
    Returns the value of the textStart record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • textStart

      private final int textStart
      The field for the textStart record component.
    • textEnd

      private final int textEnd
      The field for the textEnd record component.
    • paragraphStart

      private final int paragraphStart
      The field for the paragraphStart record component.
    • paragraphEnd

      private final int paragraphEnd
      The field for the paragraphEnd record component.
  • Constructor Details

    • IdSpans

      private IdSpans(int textStart, int textEnd, int paragraphStart, int paragraphEnd)
      Creates an instance of a IdSpans record class.
      Parameters:
      textStart - the value for the textStart record component
      textEnd - the value for the textEnd record component
      paragraphStart - the value for the paragraphStart record component
      paragraphEnd - the value for the paragraphEnd record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • textStart

      public int textStart()
      Returns the value of the textStart record component.
      Returns:
      the value of the textStart record component
    • textEnd

      public int textEnd()
      Returns the value of the textEnd record component.
      Returns:
      the value of the textEnd record component
    • paragraphStart

      public int paragraphStart()
      Returns the value of the paragraphStart record component.
      Returns:
      the value of the paragraphStart record component
    • paragraphEnd

      public int paragraphEnd()
      Returns the value of the paragraphEnd record component.
      Returns:
      the value of the paragraphEnd record component