# ImageLabel

public class **ImageLabel** extends [Object](https://developer.android.com/reference/java/lang/Object.html)  
Represents an image label detected by `https://developers.google.com/android/reference/com/google/mlkit/vision/label/ImageLabeler`.

### Public Method Summary

|---|---|
| boolean | [equals](https://developers.google.com/android/reference/com/google/mlkit/vision/label/ImageLabel#equals(java.lang.Object))([Object](https://developer.android.com/reference/java/lang/Object.html) o) Indicates whether some other object is "equal to" this one. |
| float | [getConfidence](https://developers.google.com/android/reference/com/google/mlkit/vision/label/ImageLabel#getConfidence())() Gets the confidence of this label. |
| int | [getIndex](https://developers.google.com/android/reference/com/google/mlkit/vision/label/ImageLabel#getIndex())() Gets the index of this label. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [getText](https://developers.google.com/android/reference/com/google/mlkit/vision/label/ImageLabel#getText())() Gets the text of this label. |
| int | [hashCode](https://developers.google.com/android/reference/com/google/mlkit/vision/label/ImageLabel#hashCode())() Returns a hash code value for the object. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [toString](https://developers.google.com/android/reference/com/google/mlkit/vision/label/ImageLabel#toString())() |

### 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 boolean **equals** ([Object](https://developer.android.com/reference/java/lang/Object.html) o)

Indicates whether some other object is "equal to" this one.

#### public float **getConfidence** ()

Gets the confidence of this label.

The range of this confidence depends on the classifier model used, but by convention
it should be \[0.0f, 1.0f\].

For an `https://developers.google.com/android/reference/com/google/mlkit/vision/label/ImageLabeler`
created with `https://developers.google.com/android/reference/com/google/mlkit/vision/label/defaults/ImageLabelerOptions`,
the range is \[0.0f, 1.0f\].

#### public int **getIndex** ()

Gets the index of this label.

The index maps to the detected label in the entire label map of the corresponding
model.

Indexes can be used as unique identifiers to match detected labels instead of super
long label names.

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

Gets the text of this label.

The text returned here depends on the classifier model used.

#### public int **hashCode** ()

Returns a hash code value for the object.

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