# LanguageIdentificationOptions.Builder

public static class **LanguageIdentificationOptions.Builder** extends [Object](https://developer.android.com/reference/java/lang/Object.html)  
Builder to create a `LanguageIdentificationOptions`
instance.

### Public Constructor Summary

|---|---|
|   | [Builder](https://developers.google.com/android/reference/com/google/mlkit/nl/languageid/LanguageIdentificationOptions.Builder.md.txt#Builder())() |

### Public Method Summary

|---|---|
| [LanguageIdentificationOptions](https://developers.google.com/android/reference/com/google/mlkit/nl/languageid/LanguageIdentificationOptions.md.txt) | [build](https://developers.google.com/android/reference/com/google/mlkit/nl/languageid/LanguageIdentificationOptions.Builder.md.txt#build())() Creates a new ` LanguageIdentificationOptions` instance. |
| [LanguageIdentificationOptions.Builder](https://developers.google.com/android/reference/com/google/mlkit/nl/languageid/LanguageIdentificationOptions.Builder.md.txt) | [setConfidenceThreshold](https://developers.google.com/android/reference/com/google/mlkit/nl/languageid/LanguageIdentificationOptions.Builder.md.txt#setConfidenceThreshold(float))(float confidenceThreshold) Sets the minimum confidence for the ` LanguageIdentifier.identifyLanguage(String)` or ` LanguageIdentifier.identifyPossibleLanguages(String)` call. |
| [LanguageIdentificationOptions.Builder](https://developers.google.com/android/reference/com/google/mlkit/nl/languageid/LanguageIdentificationOptions.Builder.md.txt) | [setExecutor](https://developers.google.com/android/reference/com/google/mlkit/nl/languageid/LanguageIdentificationOptions.Builder.md.txt#setExecutor(java.util.concurrent.Executor))([Executor](https://developer.android.com/reference/java/util/concurrent/Executor.html) executor) Sets the custom `Executor` to use. |

### 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 Constructors

#### public **Builder** ()

## Public Methods

#### public [LanguageIdentificationOptions](https://developers.google.com/android/reference/com/google/mlkit/nl/languageid/LanguageIdentificationOptions.md.txt)
**build** ()

Creates a new `LanguageIdentificationOptions`
instance.

#### public [LanguageIdentificationOptions.Builder](https://developers.google.com/android/reference/com/google/mlkit/nl/languageid/LanguageIdentificationOptions.Builder.md.txt) **setConfidenceThreshold** (float confidenceThreshold)

Sets the minimum confidence for the `
LanguageIdentifier.identifyLanguage(String)` or `
LanguageIdentifier.identifyPossibleLanguages(String)` call.

If no value is set, a default value is used, depending on the method call.

##### Parameters

| confidenceThreshold | the minimum confidence for the ` LanguageIdentifier.identifyLanguage(String)` or ` LanguageIdentifier.identifyPossibleLanguages(String)` call |
|---|---|

##### Returns

- this object, for chaining method calls

#### public [LanguageIdentificationOptions.Builder](https://developers.google.com/android/reference/com/google/mlkit/nl/languageid/LanguageIdentificationOptions.Builder.md.txt) **setExecutor** ([Executor](https://developer.android.com/reference/java/util/concurrent/Executor.html) executor)

Sets the custom `Executor`
to use. If no `Executor`
is set, an internal background thread pool will be used.

Most clients should not need to call this method.

##### Parameters

| executor | the `Executor` to use |
|---|---|

##### Returns

- this object, for chaining method calls