|
Sonic ESB API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sonicsw.esb.service.common.VersionNumber
public final class VersionNumber
A version number consists of a major version, a minor version, a point version and a build number.
VersionNumber
instances are immutable. The
compareTo
and equals
implementations consider
all three components (major, minor, and build). An alternate comparator is
provided that ignores build numbers.
Field Summary | |
---|---|
static java.util.Comparator<VersionNumber> |
MAJOR_MINOR_COMPARATOR
A comparator for doing comparisons that ignore the point and build number. |
Constructor Summary | |
---|---|
VersionNumber(int major,
int minor,
int build)
|
|
VersionNumber(int major,
int minor,
int point,
int build)
|
Method Summary | |
---|---|
int |
compareTo(VersionNumber other)
|
boolean |
equals(java.lang.Object obj)
|
int |
getBuild()
|
static VersionNumber |
getDefault()
Returns the default version number of 1.0.0. |
java.lang.String |
getDisplayString()
|
int |
getMajor()
|
int |
getMinor()
|
int |
getPoint()
|
int |
hashCode()
|
java.lang.String |
toString()
|
static VersionNumber |
valueOf(java.lang.String str)
Constructs a version number from the given string of the format major.minor[.point].version . |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.util.Comparator<VersionNumber> MAJOR_MINOR_COMPARATOR
Note: this comparator imposes orderings that are inconsistent with
equals
.
Constructor Detail |
---|
public VersionNumber(int major, int minor, int point, int build)
public VersionNumber(int major, int minor, int build)
Method Detail |
---|
public int getMajor()
public int getMinor()
public int getPoint()
public int getBuild()
public java.lang.String getDisplayString()
public int compareTo(VersionNumber other)
compareTo
in interface java.lang.Comparable<VersionNumber>
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static VersionNumber valueOf(java.lang.String str)
major.minor[.point].version
. The minor and/or version numbers may
be excluded, in which case they are assumed to be 0.
public static VersionNumber getDefault()
|
Sonic ESB API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |