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 Version
true
if this instance is greater than other instance, otherwise false
public boolean greaterOrEqualsThan(Version other)
this
is greater or equals than other
.other
- the other Version
true
if this instance is greater or equals than other instance, otherwise false
public boolean lesserThan(Version other)
this
is lesser than other
.other
- the other Version
true
if this instance is lesser than other instance, otherwise false
public boolean lesserOrEqualsThan(Version other)
this
is lesser or equals that other
.other
- the other Version
true
if this instance is lesser or equals than other instance, otherwise false
public boolean inside(VersionRange range)
public int compareTo(Version otherVersion)
compareTo
in interface Comparable<Version>
Copyright © 2001–2018 Codehaus Plexus. All rights reserved.