org.apache.maven.plugin.ear.util
Class JavaEEVersion

java.lang.Object
  extended by org.apache.maven.plugin.ear.util.JavaEEVersion
All Implemented Interfaces:
Comparable<JavaEEVersion>

public class JavaEEVersion
extends Object
implements Comparable<JavaEEVersion>

Represents the supported JavaEE version.

Author:
Stephane Nicoll

Field Summary
static JavaEEVersion Five
          Represents the JavaEE 5 version.
static JavaEEVersion OneDotFour
          Represents the J2EE 1.4 version.
static JavaEEVersion OneDotThree
          Represents the J2EE 1.3 version.
static JavaEEVersion Six
          Represents the JavaEE 7 version.
 
Method Summary
 int compareTo(JavaEEVersion otherVersion)
           
 boolean eq(JavaEEVersion version)
          Specifies if this version is equal to the specified version.
 boolean ge(JavaEEVersion version)
          Specifies if this version is greater or equal to the specified version.
static JavaEEVersion getJavaEEVersion(String version)
           
 String getVersion()
          Returns the version as a string.
 boolean gt(JavaEEVersion version)
          Specifies if this version is greater than the specified version.
 boolean le(JavaEEVersion version)
          Specifies if this version is less or equal to the specified version.
 boolean lt(JavaEEVersion version)
          Specifies if this version is less than the specified version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OneDotThree

public static final JavaEEVersion OneDotThree
Represents the J2EE 1.3 version.


OneDotFour

public static final JavaEEVersion OneDotFour
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 7 version.

Method Detail

getJavaEEVersion

public static JavaEEVersion getJavaEEVersion(String version)
                                      throws InvalidJavaEEVersion
Throws:
InvalidJavaEEVersion

getVersion

public String getVersion()
Returns the version as a string.

Returns:
the version string

ge

public boolean ge(JavaEEVersion version)
Specifies if this version is greater or equal to the specified version.

Parameters:
version - the version to check
Returns:
true if this version is greater or equal to version

gt

public boolean gt(JavaEEVersion version)
Specifies if this version is greater than the specified version.

Parameters:
version - the version to check
Returns:
true if this version is greater to version

eq

public boolean eq(JavaEEVersion version)
Specifies if this version is equal to the specified version.

Parameters:
version - the version to check
Returns:
true if this version is equal to version

le

public boolean le(JavaEEVersion version)
Specifies if this version is less or equal to the specified version.

Parameters:
version - the version to check
Returns:
true if this version is less or equal to version

lt

public boolean lt(JavaEEVersion version)
Specifies if this version is less than the specified version.

Parameters:
version - the version to check
Returns:
true if this version is less or equal to version

compareTo

public int compareTo(JavaEEVersion otherVersion)
Specified by:
compareTo in interface Comparable<JavaEEVersion>


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.