public class JavaEEVersion extends java.lang.Object implements java.lang.Comparable<JavaEEVersion>
| Modifier and Type | Field and Description |
|---|---|
static JavaEEVersion |
FIVE
Represents the JavaEE 5 version.
|
private java.lang.Integer |
index |
static JavaEEVersion |
ONE_DOT_FOUR
Represents the J2EE 1.4 version.
|
static JavaEEVersion |
ONE_DOT_THREE
Represents the J2EE 1.3 version.
|
static JavaEEVersion |
SEVEN
Represents the JavaEE 7 version.
|
static JavaEEVersion |
SIX
Represents the JavaEE 6 version.
|
private java.lang.String |
version |
private static java.lang.String |
VERSION_1_3 |
private static java.lang.String |
VERSION_1_4 |
private static java.lang.String |
VERSION_5 |
private static java.lang.String |
VERSION_6 |
private static java.lang.String |
VERSION_7 |
private static java.util.Map<java.lang.String,JavaEEVersion> |
VERSION_MAP |
| Modifier | Constructor and Description |
|---|---|
private |
JavaEEVersion(java.lang.Integer index,
java.lang.String version) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(JavaEEVersion otherVersion) |
boolean |
eq(JavaEEVersion paramVersion)
Specifies if this version is equal to the specified version.
|
boolean |
ge(JavaEEVersion parmVersion)
Specifies if this version is greater or equal to the specified version.
|
static JavaEEVersion |
getJavaEEVersion(java.lang.String paramVersion) |
java.lang.String |
getVersion()
Returns the version as a string.
|
boolean |
gt(JavaEEVersion paramVersion)
Specifies if this version is greater than the specified version.
|
private static boolean |
isValid(java.lang.String paramVersion)
Checks if the specified version string is valid.
|
boolean |
le(JavaEEVersion paramVersion)
Specifies if this version is less or equal to the specified version.
|
boolean |
lt(JavaEEVersion paramVersion)
Specifies if this version is less than the specified version.
|
private static final java.lang.String VERSION_1_3
private static final java.lang.String VERSION_1_4
private static final java.lang.String VERSION_5
private static final java.lang.String VERSION_6
private static final java.lang.String VERSION_7
private static final java.util.Map<java.lang.String,JavaEEVersion> VERSION_MAP
public static final JavaEEVersion ONE_DOT_THREE
public static final JavaEEVersion ONE_DOT_FOUR
public static final JavaEEVersion FIVE
public static final JavaEEVersion SIX
public static final JavaEEVersion SEVEN
private final java.lang.Integer index
private final java.lang.String version
private JavaEEVersion(java.lang.Integer index,
java.lang.String version)
public static JavaEEVersion getJavaEEVersion(java.lang.String paramVersion) throws InvalidJavaEEVersion
paramVersion - The version.JavaEEVersionInvalidJavaEEVersion - in case of a wrong version.public java.lang.String getVersion()
public boolean ge(JavaEEVersion parmVersion)
parmVersion - the version to checkpublic boolean gt(JavaEEVersion paramVersion)
paramVersion - the version to checkpublic boolean eq(JavaEEVersion paramVersion)
paramVersion - the version to checkpublic boolean le(JavaEEVersion paramVersion)
paramVersion - the version to checkpublic boolean lt(JavaEEVersion paramVersion)
paramVersion - the version to checkprivate static boolean isValid(java.lang.String paramVersion)
paramVersion - the version string to checkpublic int compareTo(JavaEEVersion otherVersion)
compareTo in interface java.lang.Comparable<JavaEEVersion>