public class Version extends Object implements Comparable<Version>
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Version otherVersion) |
boolean |
equals(Object object) |
int |
getMajor() |
int |
getMicro() |
int |
getMinor() |
boolean |
greaterOrEqualsThan(Version other)
Returns true if
this is greater or equals than other. |
boolean |
greaterThan(Version other)
Returns true if
this is greater that other. |
int |
hashCode() |
boolean |
inside(VersionRange range) |
boolean |
lesserOrEqualsThan(Version other)
Returns true if
this is lesser or equals that other. |
boolean |
lesserThan(Version other)
Returns true if
this is lesser than other. |
String |
toString() |
String |
toString(String prefix,
String separator) |
public static final Version INFINITE
public Version(String version)
public int getMajor()
public int getMinor()
public int getMicro()
public boolean greaterThan(Version other)
this is greater that other.other - the other Versiontrue if this instance is greater than other instance, otherwise falsepublic boolean greaterOrEqualsThan(Version other)
this is greater or equals than other.other - the other Versiontrue if this instance is greater or equals than other instance, otherwise falsepublic boolean lesserThan(Version other)
this is lesser than other.other - the other Versiontrue if this instance is lesser than other instance, otherwise falsepublic boolean lesserOrEqualsThan(Version other)
this is lesser or equals that other.other - the other Versiontrue if this instance is lesser or equals than other instance, otherwise falsepublic boolean inside(VersionRange range)
public int compareTo(Version otherVersion)
compareTo in interface Comparable<Version>Copyright © 2001–2020 Codehaus Plexus. All rights reserved.