# RecognitionResult

public class **RecognitionResult** extends [Object](https://developer.android.com/reference/java/lang/Object.html)  
Object representing the output of an ink recognition.

A recognizer usually provides several recognition alternatives, because the user intent is
not always clear. For example, if the user writes a vertical line and then a circle, the
recognition alternatives could include "10", "IO", and "lo".

Alternatives are named "candidates". This object represents a set of candidates as a list
of `https://developers.google.com/android/reference/com/google/mlkit/vision/digitalink/common/RecognitionCandidate`.

Use `DigitalInkRecognizer` to perform the recognition itself.

### Protected Constructor Summary

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

### Public Method Summary

|---|---|
| boolean | [equals](https://developers.google.com/android/reference/com/google/mlkit/vision/digitalink/common/RecognitionResult#equals(java.lang.Object))([Object](https://developer.android.com/reference/java/lang/Object.html) other) |
| [List](https://developer.android.com/reference/java/util/List.html)\<[RecognitionCandidate](https://developers.google.com/android/reference/com/google/mlkit/vision/digitalink/common/RecognitionCandidate)\> | [getCandidates](https://developers.google.com/android/reference/com/google/mlkit/vision/digitalink/common/RecognitionResult#getCandidates())() Returns the list of recognition alternatives. |
| int | [hashCode](https://developers.google.com/android/reference/com/google/mlkit/vision/digitalink/common/RecognitionResult#hashCode())() |
| [String](https://developer.android.com/reference/java/lang/String.html) | [toString](https://developers.google.com/android/reference/com/google/mlkit/vision/digitalink/common/RecognitionResult#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 **RecognitionResult** ()

## Public Methods

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

#### public [List](https://developer.android.com/reference/java/util/List.html)\<[RecognitionCandidate](https://developers.google.com/android/reference/com/google/mlkit/vision/digitalink/common/RecognitionCandidate)\>
**getCandidates** ()

Returns the list of recognition alternatives.

Candidates are ordered from most likely to least likely. When scores are provided,
they are in increasing order.

The number of candidates depends on the options used when initializing the
recognizer. See `DigitalInkRecognitionModel` and
`DigitalInkRecognizerOptions` for details. If nothing can be recognized,
this list will be empty.

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

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