public class ThreeDigitVersionSpecification extends VersionSpecification implements java.lang.Comparable<VersionSpecification>
Concretely, this means:
_versionString
Constructor and Description |
---|
ThreeDigitVersionSpecification(int major,
int minor,
int micro,
java.lang.String... qualifiers)
Construct a three digit version specification.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(VersionSpecification otherVersionSpecification)
Compare this specification to the argument.
|
boolean |
equals(java.lang.Object object)
Return true of the argument is equal to this object.
|
int |
getMajor()
Return the major (leading) verson digit.
|
int |
getMicro()
Return the micro (third) verson digit.
|
int |
getMinor()
Return the minor (middle) verson digit.
|
java.lang.String[] |
getQualifiers()
Return the optional array of version qualifiers.
|
int |
hashCode()
Return the hash code of this object.
|
ThreeDigitVersionSpecification |
increaseMajor()
Return a new version spec with increased major digit.
|
ThreeDigitVersionSpecification |
increaseMicro()
Return a new version spec with increased micro digit.
|
ThreeDigitVersionSpecification |
increaseMinor()
Return a new version spec with increased minor digit.
|
java.lang.String |
toString()
Produce a string representation that is itself valid again to
be parsed as a VersionSpecification.
|
parse
public ThreeDigitVersionSpecification(int major, int minor, int micro, java.lang.String... qualifiers)
major
- The major version number.minor
- The minor version number.micro
- The micro version number.qualifiers
- An optional array of arbitrary version qualifiers.public int compareTo(VersionSpecification otherVersionSpecification)
compareTo
in interface java.lang.Comparable<VersionSpecification>
otherVersionSpecification
- The version specification to which to compare.public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- The other object to which to compare.public int getMajor()
public int getMinor()
public int getMicro()
public java.lang.String[] getQualifiers()
public int hashCode()
hashCode
in class java.lang.Object
public ThreeDigitVersionSpecification increaseMicro()
public ThreeDigitVersionSpecification increaseMinor()
public ThreeDigitVersionSpecification increaseMajor()
public java.lang.String toString()
toString
in class java.lang.Object