Package opennlp.tools.util.ext
Record Class Providers.Registration<P>
java.lang.Object
java.lang.Record
opennlp.tools.util.ext.Providers.Registration<P>
- Type Parameters:
P- The SPI.- Record Components:
provider- The provider.name- The name of the provider.priority- The priority of the provider.
private static record Providers.Registration<P>(P provider, String name, int priority)
extends Record
A provider with the name and priority read once at lookup.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Comparator<Providers.Registration<?>> Orders registrations by descending priority.private final StringThe field for thenamerecord component.private final intThe field for thepriorityrecord component.private final PThe field for theproviderrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateRegistration(P provider, String name, int priority) Creates an instance of aRegistrationrecord 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.name()Returns the value of thenamerecord component.intpriority()Returns the value of thepriorityrecord component.provider()Returns the value of theproviderrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
Constructor Details
-
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 '=='. -
provider
Returns the value of theproviderrecord component.- Returns:
- the value of the
providerrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
priority
public int priority()Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-