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 example NBSP), or "" if none.
category - The Unicode general category.
breaking - The line-breaking behavior.
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 Details

    • WhitespaceCharacter

      public WhitespaceCharacter(int codePoint, String name, String abbreviation, UnicodeWhitespace.Category category, UnicodeWhitespace.Breaking breaking)
      Creates an instance of a WhitespaceCharacter record class.
      Parameters:
      codePoint - the value for the codePoint record component
      name - the value for the name record component
      abbreviation - the value for the abbreviation record component
      category - the value for the category record component
      breaking - the value for the breaking record 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

      public String toUnicodeNotation()
      Returns the U+XXXX notation for this code point.
      Returns:
      the U+XXXX notation for this code point
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • codePoint

      public int codePoint()
      Returns the value of the codePoint record component.
      Returns:
      the value of the codePoint record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • abbreviation

      public String abbreviation()
      Returns the value of the abbreviation record component.
      Returns:
      the value of the abbreviation record component
    • category

      public UnicodeWhitespace.Category category()
      Returns the value of the category record component.
      Returns:
      the value of the category record component
    • breaking

      public UnicodeWhitespace.Breaking breaking()
      Returns the value of the breaking record component.
      Returns:
      the value of the breaking record component