public enum Version extends Enum<Version>
Enum Constant and Description |
---|
HIGHER |
LOWER |
V1_10 |
V1_11 |
V1_12 |
V1_13 |
V1_14 |
V1_14_4 |
V1_15 |
V1_16 |
V1_17 |
V1_18 |
V1_19 |
V1_19_2 |
V1_19_3 |
V1_8 |
V1_9 |
Modifier and Type | Method and Description |
---|---|
int |
getFirstProtocolNumber()
Get the first protocol number of this version.
|
int |
getLastProtocolNumber()
Get the last protocol number of this version.
|
String |
getName()
Get the name of the version
|
NamedVersion |
getNamedVersion()
Get if exist or create a
NamedVersion . |
double |
getPower()
Get the power of the version (used to check newer/older)
|
static Version |
getVersion()
Get the version thanks to the adapter version name
|
static Version |
getVersionByName(String name)
Get the version thanks to it's name
|
static Version |
getVersionByProtocolID(int id)
Get the version thanks to the protocol ID
|
boolean |
hasProtocolNumber(int protocolId)
The list of all protocol number in this version
|
boolean |
isNewerOrEquals(Version other)
Check if this version is newer or equals than the given one
|
boolean |
isNewerThan(Version other)
Check if this version is strictly newer than the given one
|
static Version |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Version[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Version LOWER
public static final Version V1_8
public static final Version V1_9
public static final Version V1_10
public static final Version V1_11
public static final Version V1_12
public static final Version V1_13
public static final Version V1_14
public static final Version V1_14_4
public static final Version V1_15
public static final Version V1_16
public static final Version V1_17
public static final Version V1_18
public static final Version V1_19
public static final Version V1_19_2
public static final Version V1_19_3
public static final Version HIGHER
public static Version[] values()
for (Version c : Version.values()) System.out.println(c);
public static Version valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getName()
public int getFirstProtocolNumber()
public int getLastProtocolNumber()
public boolean isNewerThan(Version other)
other
- the version which will be comparedpublic boolean isNewerOrEquals(Version other)
other
- the version which will be comparedpublic double getPower()
public NamedVersion getNamedVersion()
NamedVersion
.public boolean hasProtocolNumber(int protocolId)
protocolId
- ID of protocol usedpublic static Version getVersionByName(String name)
name
- the name of the versionHIGHER
public static Version getVersionByProtocolID(int id)