Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Inherited Constants](https://developer.android.com/reference/android/icu/lang/UCharacterCategory#inhconstants) \| [Methods](https://developer.android.com/reference/android/icu/lang/UCharacterCategory#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/icu/lang/UCharacterCategory#inhmethods)

# UCharacterCategory

*** ** * ** ***

` public final class UCharacterCategory `   
` extends https://developer.android.com/reference/java/lang/Object ` ` implements https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.icu.lang.UCharacterCategory |

<br />

*** ** * ** ***

Enumerated Unicode category types from the UnicodeData.txt file. Used as return results from [UCharacter](https://developer.android.com/reference/android/icu/lang/UCharacter) Equivalent to icu's UCharCategory. Refer to [Unicode Consortium](http://www.unicode.org/Public/UNIDATA/UCD.html) for more information about UnicodeData.txt.

*NOTE:* the UCharacterCategory values are *not* compatible with those returned by java.lang.Character.getType. UCharacterCategory values match the ones used in ICU4C, while java.lang.Character type values, though similar, skip the value 17.

This class is not subclassable

<br />

## Summary

### Inherited constants

From interface `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory` `byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#COMBINING_SPACING_MARK`

Character type Mc
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#CONNECTOR_PUNCTUATION`

Character type Pc
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#CONTROL`

Character type Cc
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#CURRENCY_SYMBOL`

Character type Sc
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#DASH_PUNCTUATION`

Character type Pd
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#DECIMAL_DIGIT_NUMBER`

Character type Nd
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#ENCLOSING_MARK`

Character type Me
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#END_PUNCTUATION`

Character type Pe
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#FINAL_PUNCTUATION`

Character type Pf
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#FINAL_QUOTE_PUNCTUATION`

Character type Pf This name is compatible with java.lang.Character's name for this type.
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#FORMAT`

Character type Cf
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#GENERAL_OTHER_TYPES`

Character type Cn Not Assigned (no characters in \[UnicodeData.txt\] have this property)
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#INITIAL_PUNCTUATION`

Character type Pi
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#INITIAL_QUOTE_PUNCTUATION`

Character type Pi This name is compatible with java.lang.Character's name for this type.
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#LETTER_NUMBER`

Character type Nl
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#LINE_SEPARATOR`

Character type Zl
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#LOWERCASE_LETTER`

Character type Ll
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#MATH_SYMBOL`

Character type Sm
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#MODIFIER_LETTER`

Character type Lm
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#MODIFIER_SYMBOL`

Character type Sk
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#NON_SPACING_MARK`

Character type Mn
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#OTHER_LETTER`

Character type Lo
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#OTHER_NUMBER`

Character type No
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#OTHER_PUNCTUATION`

Character type Po
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#OTHER_SYMBOL`

Character type So
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#PARAGRAPH_SEPARATOR`

Character type Zp
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#PRIVATE_USE`

Character type Co
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#SPACE_SEPARATOR`

Character type Zs
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#START_PUNCTUATION`

Character type Ps
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#SURROGATE`

Character type Cs
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#TITLECASE_LETTER`

Character type Lt
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#UNASSIGNED`

Unassigned character type
`byte` `https://developer.android.com/reference/android/icu/lang/UCharacterEnums.ECharacterCategory#UPPERCASE_LETTER`

Character type Lu

| ### Public methods ||
|---|---|
| ` static https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/icu/lang/UCharacterCategory#toString(int)(int category) ` Gets the name of the argument category |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public methods

### toString

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static String toString (int category)
```

Gets the name of the argument category

<br />

| Parameters ||
|---|---|
| `category` | `int`: to retrieve name <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | category name <br /> |