Language (Apache OpenNLP Tools 2.5.9 API)
Description: declaration: package: opennlp.tools.langdetect, class: Language

# Class Language

java.lang.Object
opennlp.tools.langdetect.Language

All Implemented Interfaces:
  `Serializable`

public class Language extends Object implements Serializable
Class for holding the document language and its confidence

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Language(String lang)`
  `Language(String lang, double confidence)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `double`
  `getConfidence()`
  `String`
  `getLang()`
  `int`
  `hashCode()`
  `String`
  `toString()`

  ### Methods inherited from class Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Language

    public Language(String lang)
    Parameters:
      `lang` - The language identifier.

  - ### Language

    public Language(String lang, double confidence)
    Parameters:
      `lang` - The language identifier.
      `confidence` - The confidence computed during language detection.

- ## Method Details

  - ### getLang

    public String getLang()

  - ### getConfidence

    public double getConfidence()

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`