Class JavaEEVersion

java.lang.Object
org.apache.maven.plugins.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 Details

    • 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.
    • EIGHT

      public static final JavaEEVersion EIGHT
      Represents the JavaEE 8 version.
    • NINE

      public static final JavaEEVersion NINE
      Represents the JakartaEE 9 version.
    • TEN

      public static final JavaEEVersion TEN
      Represents the JakartaEE 10 version.
    • ELEVEN

      public static final JavaEEVersion ELEVEN
      Represents the JakartaEE 11 version.
  • Method Details

    • getJavaEEVersion

      public static JavaEEVersion getJavaEEVersion(String paramVersion) throws InvalidJavaEEVersion
      Parameters:
      paramVersion - The version.
      Returns:
      JavaEEVersion
      Throws:
      InvalidJavaEEVersion - in case of a wrong version.
    • getVersion

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

      public boolean ge(JavaEEVersion paramVersion)
      Specifies if this version is greater or equal to the specified version.
      Parameters:
      paramVersion - 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
    • compareTo

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