Version (FreeMarker 2.3.23 API)
Date: 2015-07-05

freemarker.template

## Class Version

- java.lang.Object
- - freemarker.template.Version

- All Implemented Interfaces:
    Serializable

      public final class Version
      extends Object
      implements Serializable

  Represents a version number plus the further qualifiers and build info. This is mostly used for representing a FreeMarker version number, but should also be able to parse the version strings of 3rd party libraries.
  Since:
    2.3.20
  See Also:
    `Configuration.getVersion()`, Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Version(int major, int minor, int micro)`
    `Version(int major, int minor, int micro, String extraInfo, Boolean gaeCompatible, Date buildDate)`
    `Version(String stringValue)`
    `Version(String stringValue, Boolean gaeCompliant, Date buildDate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `Date` | `getBuildDate()`
    `String` | `getExtraInfo()` The arbitrary string after the micro version number without leading dot, dash or underscore, like "RC03" in "2.4.0-RC03".
    `int` | `getMajor()` The 1st version number, like 1 in "1.2.3".
    `int` | `getMicro()` The 3rd version number, like 3 in "1.2.3".
    `int` | `getMinor()` The 2nd version number, like 2 in "1.2.3".
    `int` | `hashCode()`
    `int` | `intValue()`
    `static int` | `intValueFor(int major, int minor, int micro)`
    `Boolean` | `isGAECompliant()`
    `String` | `toString()` Contains the major.minor.micor numbers and the extraInfo part, not the other information.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Version

          public Version(String stringValue)

      Throws:
        `IllegalArgumentException` - if the version string is malformed

    - #### Version

          public Version(String stringValue,
                         Boolean gaeCompliant,
                         Date buildDate)

      Throws:
        `IllegalArgumentException` - if the version string is malformed

    - #### Version

          public Version(int major,
                         int minor,
                         int micro)

    - #### Version

          public Version(int major,
                         int minor,
                         int micro,
                         String extraInfo,
                         Boolean gaeCompatible,
                         Date buildDate)

  - ### Method Detail

    - #### intValueFor

          public static int intValueFor(int major,
                                        int minor,
                                        int micro)

    - #### toString

          public String toString()

      Contains the major.minor.micor numbers and the extraInfo part, not the other information.
      Overrides:
        `toString` in class `Object`

    - #### getMajor

          public int getMajor()

      The 1st version number, like 1 in "1.2.3".

    - #### getMinor

          public int getMinor()

      The 2nd version number, like 2 in "1.2.3".

    - #### getMicro

          public int getMicro()

      The 3rd version number, like 3 in "1.2.3".

    - #### getExtraInfo

          public String getExtraInfo()

      The arbitrary string after the micro version number without leading dot, dash or underscore, like "RC03" in "2.4.0-RC03". This is usually a qualifier (RC, SNAPHOST, nightly, beta, etc) and sometimes build info (like date).

    - #### isGAECompliant

          public Boolean isGAECompliant()

      Returns:
        The Google App Engine compliance, or `null`.

    - #### getBuildDate

          public Date getBuildDate()

      Returns:
        The build date if known, or `null`.

    - #### intValue

          public int intValue()

      Returns:
        major * 1000000 + minor * 1000 + micro.

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`