# Class VersionedLanguage

java.lang.Object
uk.ac.starlink.vo.VersionedLanguage

public class VersionedLanguage extends Object
Aggregates a TapLanguage and one of its declared versions.

Since:
  4 Apr 2023
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`VersionedLanguage(TapLanguage lang, String version)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`AdqlVersion`
`getAdqlVersion()`
Returns the version of ADQL represented by this object, if any.
`TapLanguage`
`getLanguage()`
Returns the language.
`String`
`getVersion()`
Returns the version string.
`String`
`getVersionedName()`
Returns a representation of this language/version combination in the form <language-name>-<version-name>.
`String`
`toString()`

### Methods inherited from class Object

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

## Constructor Details

### VersionedLanguage

public VersionedLanguage(TapLanguage lang, String version)
Constructor.

Parameters:
  `lang` - language
  `version` - version string
Throws:
  `IllegalArgumentException` - if version is not one of language's declared versions

## Method Details

### getLanguage

public TapLanguage getLanguage()
Returns the language.

Returns:
  language

### getVersion

public String getVersion()
Returns the version string.

Returns:
  version string

### getAdqlVersion

public AdqlVersion getAdqlVersion()
Returns the version of ADQL represented by this object, if any.

Returns:
  ADQL version, or null

### getVersionedName

public String getVersionedName()
Returns a representation of this language/version combination in the form <language-name>-<version-name>. This is the form required for the value of the LANG parameter supplied to a TAP service, as defined by section 2.7.1 of TAP 1.1.

Returns:
  versioned name

### toString

public String toString()

Overrides:
  `toString` in class `Object`