Package com.yahoo.language.process
Class CharacterClasses
java.lang.Object
com.yahoo.language.process.CharacterClasses
Determines the class of a given character. Use this rather than java.lang.Character.
- Author:
- bratseth
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isDigit
(int c) Returns true for code points which should be considered digits - same as java.lang.Character.isDigitboolean
isLatin
(int c) Returns true if this is a latin characterboolean
isLatinDigit
(int c) Returns true if this is a latin digit (other digits are not consistently parsed into numbers by Java)boolean
isLetter
(int c) Returns true for code points which are letters in unicode 3 or 4, plus some additional characters which are useful to view as letters even though not defined as such in unicode.boolean
isLetterOrDigit
(int c) Convenience, returns isLetter(c) || isDigit(c)boolean
isSymbol
(int c) Returns true if the character is in the class "other symbol" - emojis etc.
-
Constructor Details
-
CharacterClasses
public CharacterClasses()
-
-
Method Details
-
isLetter
public boolean isLetter(int c) Returns true for code points which are letters in unicode 3 or 4, plus some additional characters which are useful to view as letters even though not defined as such in unicode. -
isSymbol
public boolean isSymbol(int c) Returns true if the character is in the class "other symbol" - emojis etc. -
isDigit
public boolean isDigit(int c) Returns true for code points which should be considered digits - same as java.lang.Character.isDigit -
isLatinDigit
public boolean isLatinDigit(int c) Returns true if this is a latin digit (other digits are not consistently parsed into numbers by Java) -
isLatin
public boolean isLatin(int c) Returns true if this is a latin character -
isLetterOrDigit
public boolean isLetterOrDigit(int c) Convenience, returns isLetter(c) || isDigit(c)
-