Package opennlp.tools.util.normalizer
Record Class EmojiEmoticons.Direction
java.lang.Object
java.lang.Record
opennlp.tools.util.normalizer.EmojiEmoticons.Direction
- Record Components:
table- the candidate mappings keyed by first source code point.minFirst- the smallest first code point of any source.maxFirst- the largest first code point of any source.
- Enclosing class:
EmojiEmoticons
static record EmojiEmoticons.Direction(Map<Integer,List<EmojiEmoticons.Mapping>> table, int minFirst, int maxFirst)
extends Record
One direction table, keyed by the first code point of the source sequence, candidates ordered
longest source first so a scan is longest-match. The first-code-point range bounds let the
scan skip the map lookup for the common code point that no source starts with.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDirection(Map<Integer, List<EmojiEmoticons.Mapping>> table, int minFirst, int maxFirst) Creates an instance of aDirectionrecord class. -
Method Summary
Modifier and TypeMethodDescription(package private) List<EmojiEmoticons.Mapping> candidates(int codePoint) Returns the candidate mappings whose source starts withcodePoint, longest source first, ornullif no source starts with it.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intmaxFirst()Returns the value of themaxFirstrecord component.intminFirst()Returns the value of theminFirstrecord component.table()Returns the value of thetablerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
Constructor Details
-
Direction
Direction(Map<Integer, List<EmojiEmoticons.Mapping>> table, int minFirst, int maxFirst) Creates an instance of aDirectionrecord class.
-
-
Method Details
-
candidates
Returns the candidate mappings whose source starts withcodePoint, longest source first, ornullif no source starts with it.- Parameters:
codePoint- the code point at the current scan position.- Returns:
- the candidate mappings whose source starts with
codePoint, longest source first, ornullif no source starts with it
-
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 '=='. -
table
Returns the value of thetablerecord component.- Returns:
- the value of the
tablerecord component
-
minFirst
public int minFirst()Returns the value of theminFirstrecord component.- Returns:
- the value of the
minFirstrecord component
-
maxFirst
public int maxFirst()Returns the value of themaxFirstrecord component.- Returns:
- the value of the
maxFirstrecord component
-