Class 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.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private JavaEEVersion​(java.lang.Integer index, java.lang.String version)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • 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
    • Constructor Detail

      • JavaEEVersion

        private JavaEEVersion​(java.lang.Integer index,
                              java.lang.String version)
    • Method Detail

      • 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:
        compareTo in interface java.lang.Comparable<JavaEEVersion>