org.codehaus.modello.model

Class Version

Implemented Interfaces:
Comparable

public class Version
extends java.lang.Object
implements Comparable

A version string is on the form ...
Version:
$Id: Version.java 688 2006-11-21 13:45:03Z brett $
Authors:
Trygve Laugstøl
Emmanuel Venisse

Field Summary

static Version
INFINITE

Constructor Summary

Version(String version)

Method Summary

int
compareTo(Object o)
boolean
equals(Object object)
int
getMajor()
int
getMicro()
int
getMinor()
boolean
greaterOrEqualsThan(Version other)
Returns true if this is greater or equals that 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 that other.
String
toString()
String
toString(String prefix, String separator)

Field Details

INFINITE

public static final Version INFINITE

Constructor Details

Version

public Version(String version)

Method Details

compareTo

public int compareTo(Object o)

equals

public boolean equals(Object object)

getMajor

public int getMajor()

getMicro

public int getMicro()

getMinor

public int getMinor()

greaterOrEqualsThan

public boolean greaterOrEqualsThan(Version other)
Returns true if this is greater or equals that other.
Parameters:
other -

greaterThan

public boolean greaterThan(Version other)
Returns true if this is greater that other.
Parameters:
other -

hashCode

public int hashCode()

inside

public boolean inside(VersionRange range)

lesserOrEqualsThan

public boolean lesserOrEqualsThan(Version other)
Returns true if this is lesser or equals that other.
Parameters:
other -

lesserThan

public boolean lesserThan(Version other)
Returns true if this is lesser that other.
Parameters:
other -

toString

public String toString()

toString

public String toString(String prefix,
                       String separator)