Package org.apache.maven.plugin.ear.util
Class JavaEEVersion
- java.lang.Object
-
- org.apache.maven.plugin.ear.util.JavaEEVersion
-
- All Implemented Interfaces:
java.lang.Comparable<JavaEEVersion>
public class JavaEEVersion extends java.lang.Object implements java.lang.Comparable<JavaEEVersion>
Represents the supported JavaEE version.
-
-
Field Summary
Fields Modifier and Type Field Description static JavaEEVersionFIVERepresents the JavaEE 5 version.private java.lang.Integerindexstatic JavaEEVersionONE_DOT_FOURRepresents the J2EE 1.4 version.static JavaEEVersionONE_DOT_THREERepresents the J2EE 1.3 version.static JavaEEVersionSEVENRepresents the JavaEE 7 version.static JavaEEVersionSIXRepresents the JavaEE 6 version.private java.lang.Stringversionprivate static java.lang.StringVERSION_1_3private static java.lang.StringVERSION_1_4private static java.lang.StringVERSION_5private static java.lang.StringVERSION_6private static java.lang.StringVERSION_7private static java.util.Map<java.lang.String,JavaEEVersion>VERSION_MAP
-
Constructor Summary
Constructors Modifier Constructor Description privateJavaEEVersion(java.lang.Integer index, java.lang.String version)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(JavaEEVersion otherVersion)booleaneq(JavaEEVersion paramVersion)Specifies if this version is equal to the specified version.booleange(JavaEEVersion parmVersion)Specifies if this version is greater or equal to the specified version.static JavaEEVersiongetJavaEEVersion(java.lang.String paramVersion)java.lang.StringgetVersion()Returns the version as a string.booleangt(JavaEEVersion paramVersion)Specifies if this version is greater than the specified version.private static booleanisValid(java.lang.String paramVersion)Checks if the specified version string is valid.booleanle(JavaEEVersion paramVersion)Specifies if this version is less or equal to the specified version.booleanlt(JavaEEVersion paramVersion)Specifies if this version is less than the specified version.
-
-
-
Field Detail
-
VERSION_1_3
private static final java.lang.String VERSION_1_3
- See Also:
- Constant Field Values
-
VERSION_1_4
private static final java.lang.String VERSION_1_4
- See Also:
- Constant Field Values
-
VERSION_5
private static final java.lang.String VERSION_5
- See Also:
- Constant Field Values
-
VERSION_6
private static final java.lang.String VERSION_6
- See Also:
- Constant Field Values
-
VERSION_7
private static final java.lang.String VERSION_7
- See Also:
- Constant Field Values
-
VERSION_MAP
private static final java.util.Map<java.lang.String,JavaEEVersion> VERSION_MAP
-
ONE_DOT_THREE
public static final JavaEEVersion ONE_DOT_THREE
Represents the J2EE 1.3 version.
-
ONE_DOT_FOUR
public static final JavaEEVersion ONE_DOT_FOUR
Represents the J2EE 1.4 version.
-
FIVE
public static final JavaEEVersion FIVE
Represents the JavaEE 5 version.
-
SIX
public static final JavaEEVersion SIX
Represents the JavaEE 6 version.
-
SEVEN
public static final JavaEEVersion SEVEN
Represents the JavaEE 7 version.
-
index
private final java.lang.Integer index
-
version
private final java.lang.String version
-
-
Method Detail
-
getJavaEEVersion
public static JavaEEVersion getJavaEEVersion(java.lang.String paramVersion) throws InvalidJavaEEVersion
- Parameters:
paramVersion- The version.- Returns:
JavaEEVersion- Throws:
InvalidJavaEEVersion- in case of a wrong version.
-
getVersion
public java.lang.String getVersion()
Returns the version as a string.- Returns:
- the version string
-
ge
public boolean ge(JavaEEVersion parmVersion)
Specifies if this version is greater or equal to the specified version.- Parameters:
parmVersion- the version to check- Returns:
- true if this version is greater or equal to version
-
gt
public boolean gt(JavaEEVersion paramVersion)
Specifies if this version is greater than the specified version.- Parameters:
paramVersion- the version to check- Returns:
- true if this version is greater to version
-
eq
public boolean eq(JavaEEVersion paramVersion)
Specifies if this version is equal to the specified version.- Parameters:
paramVersion- the version to check- Returns:
- true if this version is equal to version
-
le
public boolean le(JavaEEVersion paramVersion)
Specifies if this version is less or equal to the specified version.- Parameters:
paramVersion- the version to check- Returns:
- true if this version is less or equal to version
-
lt
public boolean lt(JavaEEVersion paramVersion)
Specifies if this version is less than the specified version.- Parameters:
paramVersion- the version to check- Returns:
- true if this version is less or equal to version
-
isValid
private static boolean isValid(java.lang.String paramVersion)
Checks if the specified version string is valid.- Parameters:
paramVersion- the version string to check- Returns:
- true if the version is valid
-
compareTo
public int compareTo(JavaEEVersion otherVersion)
- Specified by:
compareToin interfacejava.lang.Comparable<JavaEEVersion>
-
-