Package opennlp.tools.tokenize.lattice
Record Class CategoryTable.Builder.Mapping
java.lang.Object
java.lang.Record
opennlp.tools.tokenize.lattice.CategoryTable.Builder.Mapping
- Record Components:
sourceStart- The first code point on the mapping line, used in error messages even if a later mapping replaces it.categories- The category names from the mapping, primary first.
- Enclosing class:
CategoryTable.Builder
private static record CategoryTable.Builder.Mapping(int sourceStart, String[] categories)
extends Record
One mapping line retained for validation after all categories have been read.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String[]The field for thecategoriesrecord component.private final intThe field for thesourceStartrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]Returns the value of thecategoriesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thesourceStartrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
sourceStart
private final int sourceStartThe field for thesourceStartrecord component. -
categories
The field for thecategoriesrecord component.
-
-
Constructor Details
-
Mapping
Creates an instance of aMappingrecord class.- Parameters:
sourceStart- the value for thesourceStartrecord componentcategories- the value for thecategoriesrecord 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 '=='. -
sourceStart
public int sourceStart()Returns the value of thesourceStartrecord component.- Returns:
- the value of the
sourceStartrecord component
-
categories
Returns the value of thecategoriesrecord component.- Returns:
- the value of the
categoriesrecord component
-