Package org.codehaus.modello.model
Class Version
- java.lang.Object
-
- org.codehaus.modello.model.Version
-
-
Constructor Summary
Constructors Constructor Description Version(java.lang.String version)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Version otherVersion)
boolean
equals(java.lang.Object object)
int
getMajor()
int
getMicro()
int
getMinor()
boolean
greaterOrEqualsThan(Version other)
Returns true ifthis
is greater or equals thanother
.boolean
greaterThan(Version other)
Returns true ifthis
is greater thatother
.int
hashCode()
boolean
inside(VersionRange range)
boolean
lesserOrEqualsThan(Version other)
Returns true ifthis
is lesser or equals thatother
.boolean
lesserThan(Version other)
Returns true ifthis
is lesser thanother
.java.lang.String
toString()
java.lang.String
toString(java.lang.String prefix, java.lang.String separator)
-
-
-
Field Detail
-
INFINITE
public static final Version INFINITE
-
major
private short major
-
minor
private short minor
-
micro
private short micro
-
-
Method Detail
-
getMajor
public int getMajor()
-
getMinor
public int getMinor()
-
getMicro
public int getMicro()
-
greaterThan
public boolean greaterThan(Version other)
Returns true ifthis
is greater thatother
.- Parameters:
other
- the otherVersion
- Returns:
true
if this instance is greater than other instance, otherwisefalse
-
greaterOrEqualsThan
public boolean greaterOrEqualsThan(Version other)
Returns true ifthis
is greater or equals thanother
.- Parameters:
other
- the otherVersion
- Returns:
true
if this instance is greater or equals than other instance, otherwisefalse
-
lesserThan
public boolean lesserThan(Version other)
Returns true ifthis
is lesser thanother
.- Parameters:
other
- the otherVersion
- Returns:
true
if this instance is lesser than other instance, otherwisefalse
-
lesserOrEqualsThan
public boolean lesserOrEqualsThan(Version other)
Returns true ifthis
is lesser or equals thatother
.- Parameters:
other
- the otherVersion
- Returns:
true
if this instance is lesser or equals than other instance, otherwisefalse
-
inside
public boolean inside(VersionRange range)
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toString
public java.lang.String toString(java.lang.String prefix, java.lang.String separator)
-
-