# Class LanguageCandidate

java.lang.Object
com.codename1.ai.language.LanguageCandidate

public final class LanguageCandidate extends Object
One ranked BCP-47 language candidate returned by `LanguageIdentifier.identify(String, LanguageOptions)`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LanguageCandidate(String languageTag, float confidence)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `float`
  `getConfidence()`
  `String`
  `getLanguageTag()`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### LanguageCandidate

    public LanguageCandidate(String languageTag, float confidence)
    Parameters:
      `languageTag` - BCP-47 tag, or `und` when undetermined
      `confidence` - backend confidence in the range 0..1

- ## Method Details

  - ### getLanguageTag

    public String getLanguageTag()
    Returns:
      BCP-47 language tag

  - ### getConfidence

    public float getConfidence()
    Returns:
      backend confidence in the range 0..1