Package opennlp.tools.util
Record Class DictionaryCatalog.Entry
java.lang.Object
java.lang.Record
opennlp.tools.util.DictionaryCatalog.Entry
- Record Components:
id- The catalog id.uri- The absolute download URI.sha512- The expected SHA-512 hex digest.filename- An optional preferred local file name; may benull.
- Enclosing class:
DictionaryCatalog
public static record DictionaryCatalog.Entry(String id, URI uri, String sha512, String filename)
extends Record
One catalog entry with a URI and the SHA-512 digest of its bytes.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.filename()Returns the value of thefilenamerecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.sha512()Returns the value of thesha512record component.final StringtoString()Returns a string representation of this record class.uri()Returns the value of theurirecord component.
-
Field Details
-
Constructor Details
-
Entry
Validates the components.- Parameters:
id- The catalog id. Must not benull.uri- The absolute download URI. Must not benull.sha512- The expected SHA-512 hex digest. Must not benull.filename- An optional preferred local file name; may benull.- Throws:
IllegalArgumentException- Thrown if a required value isnull,uriis relative,sha512is not 128 hex digits, orfilenameis not a local file name.
-
-
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 withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
uri
Returns the value of theurirecord component.- Returns:
- the value of the
urirecord component
-
sha512
Returns the value of thesha512record component.- Returns:
- the value of the
sha512record component
-
filename
Returns the value of thefilenamerecord component.- Returns:
- the value of the
filenamerecord component
-