Enum Class TapVersion
- All Implemented Interfaces:
Serializable, Comparable<TapVersion>, Constable
Version of the TAP protocol.
- Since:
- 5 Oct 2018
- Author:
- Mark Taylor
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic TapVersionfromString(String txt) Returns the best guess at a defined TapVersion value for a given version string.Returns a numeric text string corresponding to this version.booleanis11()True if this version is greater than or equal to TAP version 1.1.toString()static TapVersionReturns 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.
-
Enum Constant Details
-
V10
TAP version 1.0. -
V11
TAP version 1.1.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
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
Returns the best guess at a defined TapVersion value for a given version string. "1.1" maps toV11and "1.0" (as well as most other things) map toV10.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
- Overrides:
toStringin classEnum<TapVersion>
-