# RecognitionCandidate

public class **RecognitionCandidate** extends [Object](https://developer.android.com/reference/java/lang/Object.html)  
Individual recognition candidate.

A recognizer usually provides several recognition alternatives. This object represents one
such alternative.

See `https://developers.google.com/android/reference/com/google/mlkit/vision/digitalink/common/RecognitionResult`
for more details.

### Protected Constructor Summary

|---|---|
|   | [RecognitionCandidate](https://developers.google.com/android/reference/com/google/mlkit/vision/digitalink/common/RecognitionCandidate#RecognitionCandidate())() |

### Public Method Summary

|---|---|
| boolean | [equals](https://developers.google.com/android/reference/com/google/mlkit/vision/digitalink/common/RecognitionCandidate#equals(java.lang.Object))([Object](https://developer.android.com/reference/java/lang/Object.html) other) Indicates whether some other object is "equal to" this one. |
| [Float](https://developer.android.com/reference/java/lang/Float.html) | [getScore](https://developers.google.com/android/reference/com/google/mlkit/vision/digitalink/common/RecognitionCandidate#getScore())() Returns this candidate's score. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [getText](https://developers.google.com/android/reference/com/google/mlkit/vision/digitalink/common/RecognitionCandidate#getText())() Returns the textual representation of the recognition. |
| int | [hashCode](https://developers.google.com/android/reference/com/google/mlkit/vision/digitalink/common/RecognitionCandidate#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/digitalink/common/RecognitionCandidate#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() |

## Protected Constructors

#### protected **RecognitionCandidate** ()

## Public Methods

#### public boolean **equals** ([Object](https://developer.android.com/reference/java/lang/Object.html) other)

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

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

Returns this candidate's score.

Values may be positive or negative. More likely candidates get lower values. This
value is populated only for models that support scores. Otherwise a `null`
value is returned.

Scores are meant to be used to reject candidates whose score is above a threshold. A
particular threshold value for a given application will stay valid after a model
update.

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

Returns the textual representation of the recognition.

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

Returns a hash code value for the object.

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