Class Version

  • All Implemented Interfaces:
    java.lang.Comparable<Version>

    public class Version
    extends java.lang.Object
    implements java.lang.Comparable<Version>
    Object that encapsulates version information of a component, and is return by Versioned.version().
    Since:
    1.6
    • Field Detail

      • _majorVersion

        protected final int _majorVersion
      • _minorVersion

        protected final int _minorVersion
      • _patchLevel

        protected final int _patchLevel
      • _snapshotInfo

        protected final java.lang.String _snapshotInfo
        Additional information for snapshot versions; null for non-snapshot (release) versions.
    • Constructor Detail

      • Version

        public Version​(int major,
                       int minor,
                       int patchLevel,
                       java.lang.String snapshotInfo)
    • Method Detail

      • unknownVersion

        public static Version unknownVersion()
        Method returns canonical "not known" version, which is used as version in cases where actual version information is not known (instead of null).
      • isUknownVersion

        public boolean isUknownVersion()
      • isSnapshot

        public boolean isSnapshot()
      • getMajorVersion

        public int getMajorVersion()
      • getMinorVersion

        public int getMinorVersion()
      • getPatchLevel

        public int getPatchLevel()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • compareTo

        public int compareTo​(Version other)
        Specified by:
        compareTo in interface java.lang.Comparable<Version>