org.codehaus.modello.model
Class Version

java.lang.Object
  extended by org.codehaus.modello.model.Version
All Implemented Interfaces:
java.lang.Comparable

public class Version
extends java.lang.Object
implements java.lang.Comparable

A version string is on the form ...

Version:
$Id: Version.java 688 2006-11-21 13:45:03Z brett $
Author:
Trygve Laugstøl, Emmanuel Venisse

Field Summary
static Version INFINITE
           
 
Constructor Summary
Version(java.lang.String version)
           
 
Method Summary
 int compareTo(java.lang.Object o)
           
 boolean equals(java.lang.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.
 java.lang.String toString()
           
 java.lang.String toString(java.lang.String prefix, java.lang.String separator)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

INFINITE

public static final Version INFINITE
Constructor Detail

Version

public Version(java.lang.String version)
Method Detail

getMajor

public int getMajor()

getMinor

public int getMinor()

getMicro

public int getMicro()

greaterThan

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

Parameters:
other -

greaterOrEqualsThan

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

Parameters:
other -

lesserThan

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

Parameters:
other -

lesserOrEqualsThan

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

Parameters:
other -

inside

public boolean inside(VersionRange range)

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toString

public java.lang.String toString(java.lang.String prefix,
                                 java.lang.String separator)

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable


Copyright © 2001-2011 Codehaus. All Rights Reserved.