public class Version extends java.lang.Object implements java.lang.Comparable<Version>, java.io.Serializable
Note that optional group and artifact id properties are new with Jackson 2.0: if provided, they should align with Maven artifact information.
Constructor and Description |
---|
Version(int major,
int minor,
int patchLevel,
java.lang.String snapshotInfo)
Deprecated.
Use variant that takes group and artifact ids
|
Version(int major,
int minor,
int patchLevel,
java.lang.String snapshotInfo,
java.lang.String groupId,
java.lang.String artifactId) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Version other) |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getArtifactId() |
java.lang.String |
getGroupId() |
int |
getMajorVersion() |
int |
getMinorVersion() |
int |
getPatchLevel() |
int |
hashCode() |
boolean |
isSnapshot() |
boolean |
isUknownVersion()
Deprecated.
Since 2.7 use correctly spelled method
isUnknownVersion() |
boolean |
isUnknownVersion() |
java.lang.String |
toFullString() |
java.lang.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).
|
@Deprecated public Version(int major, int minor, int patchLevel, java.lang.String snapshotInfo)
major
- Major version numberminor
- Minor version numberpatchLevel
- patch level of versionsnapshotInfo
- Optional additional string qualifierpublic Version(int major, int minor, int patchLevel, java.lang.String snapshotInfo, java.lang.String groupId, java.lang.String artifactId)
public static Version unknownVersion()
public boolean isUnknownVersion()
True
if this instance is the one returned by
call to unknownVersion()
isUknownVersion()
public boolean isSnapshot()
@Deprecated public boolean isUknownVersion()
isUnknownVersion()
True
if this instance is the one returned by
call to unknownVersion()
public int getMajorVersion()
public int getMinorVersion()
public int getPatchLevel()
public java.lang.String getGroupId()
public java.lang.String getArtifactId()
public java.lang.String toFullString()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
Copyright © 2010 - 2023 Adobe. All Rights Reserved