Package org.codehaus.jackson
Class Version
- java.lang.Object
-
- org.codehaus.jackson.Version
-
- All Implemented Interfaces:
Comparable<Version>
public class Version extends Object implements Comparable<Version>
Object that encapsulates version information of a component, and is return byVersioned.version().- Since:
- 1.6
-
-
Field Summary
Fields Modifier and Type Field Description protected int_majorVersionprotected int_minorVersionprotected int_patchLevelprotected String_snapshotInfoAdditional information for snapshot versions; null for non-snapshot (release) versions.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Version other)booleanequals(Object o)intgetMajorVersion()intgetMinorVersion()intgetPatchLevel()inthashCode()booleanisSnapshot()booleanisUknownVersion()StringtoString()static VersionunknownVersion()Method returns canonical "not known" version, which is used as version in cases where actual version information is not known (instead of null).
-
-
-
Field Detail
-
_majorVersion
protected final int _majorVersion
-
_minorVersion
protected final int _minorVersion
-
_patchLevel
protected final int _patchLevel
-
_snapshotInfo
protected final String _snapshotInfo
Additional information for snapshot versions; null for non-snapshot (release) versions.
-
-
Constructor Detail
-
Version
public Version(int major, int minor, int patchLevel, 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()
-
compareTo
public int compareTo(Version other)
- Specified by:
compareToin interfaceComparable<Version>
-
-