# Barcode.PersonName

public static class **Barcode.PersonName** extends [Object](https://developer.android.com/reference/java/lang/Object.html)  
A person's name, both formatted version and individual name components.

### Public Method Summary

|---|---|
| [String](https://developer.android.com/reference/java/lang/String.html) | [getFirst](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/common/Barcode.PersonName#getFirst())() Gets first name. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [getFormattedName](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/common/Barcode.PersonName#getFormattedName())() Gets the properly formatted name. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [getLast](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/common/Barcode.PersonName#getLast())() Gets last name. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [getMiddle](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/common/Barcode.PersonName#getMiddle())() Gets middle name. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [getPrefix](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/common/Barcode.PersonName#getPrefix())() Gets prefix of the name. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [getPronunciation](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/common/Barcode.PersonName#getPronunciation())() Designates a text string to be set as the kana name in the phonebook. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [getSuffix](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/common/Barcode.PersonName#getSuffix())() Gets suffix of the person's name. |

### Inherited Method Summary

From class java.lang.Object

|---|---|
| [Object](https://developer.android.com/reference/java/lang/Object.html) | clone() |
| boolean | equals([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |
| void | finalize() |
| final [Class](https://developer.android.com/reference/java/lang/Class.html)\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| [String](https://developer.android.com/reference/java/lang/String.html) | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

## Public Methods

#### public [String](https://developer.android.com/reference/java/lang/String.html) **getFirst** ()

Gets first name.

Returns `null` if not available.

#### public [String](https://developer.android.com/reference/java/lang/String.html) **getFormattedName** ()

Gets the properly formatted name.

Returns `null` if not available.

#### public [String](https://developer.android.com/reference/java/lang/String.html) **getLast** ()

Gets last name.

Returns `null` if not available.

#### public [String](https://developer.android.com/reference/java/lang/String.html) **getMiddle** ()

Gets middle name.

Returns `null` if not available.

#### public [String](https://developer.android.com/reference/java/lang/String.html) **getPrefix** ()

Gets prefix of the name.

Returns `null` if not available.

#### public [String](https://developer.android.com/reference/java/lang/String.html) **getPronunciation** ()

Designates a text string to be set as the kana name in the phonebook. Used for
Japanese contacts.

Returns `null` if not available.

#### public [String](https://developer.android.com/reference/java/lang/String.html) **getSuffix** ()

Gets suffix of the person's name.

Returns `null` if not available.