Record Class UnicodeWhitespace.WhitespaceCharacter
java.lang.Object
java.lang.Record
opennlp.tools.util.normalizer.UnicodeWhitespace.WhitespaceCharacter
- Record Components:
codePoint- The Unicode code point.name- The Unicode character name, lower cased as in the reference table.abbreviation- The common abbreviation (for exampleNBSP), or""if none.category- The Unicode generalcategory.breaking- The line-breakingbehavior.
- Enclosing class:
UnicodeWhitespace
public static record UnicodeWhitespace.WhitespaceCharacter(int codePoint, String name, String abbreviation, UnicodeWhitespace.Category category, UnicodeWhitespace.Breaking breaking)
extends Record
One Unicode whitespace code point and its reference attributes.
-
Constructor Summary
ConstructorsConstructorDescriptionWhitespaceCharacter(int codePoint, String name, String abbreviation, UnicodeWhitespace.Category category, UnicodeWhitespace.Breaking breaking) Creates an instance of aWhitespaceCharacterrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theabbreviationrecord component.breaking()Returns the value of thebreakingrecord component.category()Returns the value of thecategoryrecord component.intReturns the value of thecodePointrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns whether this code point forces a line or paragraph break.booleanReturns whether this is a non-breaking space.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.Returns theU+XXXXnotation for this code point.
-
Constructor Details
-
WhitespaceCharacter
public WhitespaceCharacter(int codePoint, String name, String abbreviation, UnicodeWhitespace.Category category, UnicodeWhitespace.Breaking breaking) Creates an instance of aWhitespaceCharacterrecord class.- Parameters:
codePoint- the value for thecodePointrecord componentname- the value for thenamerecord componentabbreviation- the value for theabbreviationrecord componentcategory- the value for thecategoryrecord componentbreaking- the value for thebreakingrecord component
-
-
Method Details
-
isLineBreak
public boolean isLineBreak()Returns whether this code point forces a line or paragraph break.- Returns:
- whether this code point forces a line or paragraph break
-
isNonBreaking
public boolean isNonBreaking()Returns whether this is a non-breaking space.- Returns:
- whether this is a non-breaking space
-
toUnicodeNotation
Returns theU+XXXXnotation for this code point.- Returns:
- the
U+XXXXnotation for this code point
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
codePoint
-
name
-
abbreviation
Returns the value of theabbreviationrecord component.- Returns:
- the value of the
abbreviationrecord component
-
category
-
breaking
-