Package uk.ac.starlink.vo

# Enum Class TapVersion

java.lang.Object
java.lang.Enum<TapVersion>
uk.ac.starlink.vo.TapVersion

All Implemented Interfaces:
  `Serializable`, `Comparable<TapVersion>`, `Constable`

public enum TapVersion extends Enum<TapVersion>
Version of the TAP protocol.

Since:
  5 Oct 2018
Author:
  Mark Taylor
See Also:
  - Table Access Protocol

## Nested Class Summary

## Nested classes/interfaces inherited from class java.lang.Enum

`Enum.EnumDesc<E extends Enum<E>>`

## Enum Constant Summary

Enum Constants
Enum Constant
Description
`V10`
TAP version 1.0.
`V11`
TAP version 1.1.

## Method Summary

Modifier and Type
Method
Description
`static TapVersion`
`fromString(String txt)`
Returns the best guess at a defined TapVersion value for a given version string.
`String`
`getNumber()`
Returns a numeric text string corresponding to this version.
`boolean`
`is11()`
True if this version is greater than or equal to TAP version 1.1.
`String`
`toString()`
`static TapVersion`
`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static TapVersion[]`
`values()`
Returns an array containing the constants of this enum class, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf`

### Methods inherited from class java.lang.Object

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

## Enum Constant Details

### V10

public static final TapVersion V10
TAP version 1.0.

### V11

public static final TapVersion V11
TAP version 1.1.

## Method Details

### values

public static TapVersion[] values()
Returns an array containing the constants of this enum class, in the order they are declared.

Returns:
  an array containing the constants of this enum class, in the order they are declared

### valueOf

public static TapVersion valueOf(String name)
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `IllegalArgumentException` - if this enum class has no constant with the specified name
  `NullPointerException` - if the argument is null

### getNumber

public String getNumber()
Returns a numeric text string corresponding to this version.

Returns:
  numeric string, for instance "1.0"

### is11

public boolean is11()
True if this version is greater than or equal to TAP version 1.1.

Returns:
  true for v1.1+

### fromString

public static TapVersion fromString(String txt)
Returns the best guess at a defined TapVersion value for a given version string. "1.1" maps to `V11` and "1.0" (as well as most other things) map to `V10`.

TAP 1.1 sec 2.4 says "clients should treat a missing version attribute as equivalent to version='1.0'."

Parameters:
  `txt` - version string, may be null
Returns:
  TapVersion instance, not null

### toString

public String toString()

Overrides:
  `toString` in class `Enum<TapVersion>`