public class

Version

extends Object
implements Comparable<T>
java.lang.Object
   ↳ com.fasterxml.jackson.core.Version

Class Overview

Object that encapsulates versioning information of a component. Version information includes not just version number but also optionally group and artifact ids of the component being versioned.

Note that optional group and artifact id properties are new with Jackson 2.0: if provided, they should align with Maven artifact information.

Summary

Fields
protected final String _artifactId
protected final String _groupId
protected final int _majorVersion
protected final int _minorVersion
protected final int _patchLevel
protected final String _snapshotInfo Additional information for snapshot versions; null for non-snapshot (release) versions.
Public Constructors
Version(int major, int minor, int patchLevel, String snapshotInfo)
This constructor is deprecated. Use variant that takes group and artifact ids
Version(int major, int minor, int patchLevel, String snapshotInfo, String groupId, String artifactId)
Public Methods
int compareTo(Version other)
boolean equals(Object o)
String getArtifactId()
String getGroupId()
int getMajorVersion()
int getMinorVersion()
int getPatchLevel()
int hashCode()
boolean isSnapshot()
boolean isUknownVersion()
String toString()
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).
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.lang.Comparable

Fields

protected final String _artifactId

protected final String _groupId

protected final int _majorVersion

protected final int _minorVersion

protected final int _patchLevel

protected final String _snapshotInfo

Additional information for snapshot versions; null for non-snapshot (release) versions.

Public Constructors

public Version (int major, int minor, int patchLevel, String snapshotInfo)

This constructor is deprecated.
Use variant that takes group and artifact ids

public Version (int major, int minor, int patchLevel, String snapshotInfo, String groupId, String artifactId)

Public Methods

public int compareTo (Version other)

public boolean equals (Object o)

public String getArtifactId ()

public String getGroupId ()

public int getMajorVersion ()

public int getMinorVersion ()

public int getPatchLevel ()

public int hashCode ()

public boolean isSnapshot ()

public boolean isUknownVersion ()

public String toString ()

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).