org.jtheque.utils.bean
Class Version

java.lang.Object
  extended by org.jtheque.utils.bean.Version
All Implemented Interfaces:
Comparable<Version>

public final class Version
extends Object
implements Comparable<Version>

A version of a module or an other part of the application.

Author:
Baptiste Wicht

Constructor Summary
Version(String version)
          Construct a new JThequeVersion with the String version.
 
Method Summary
 int compareTo(Version o)
           
 boolean equals(Object obj)
           
 String getVersion()
          Returns the string version.
 int hashCode()
           
 boolean isGreaterThan(Version otherVersion)
          Indicate if the version is greater than an other version.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Version

public Version(String version)
Construct a new JThequeVersion with the String version.

Parameters:
version - The version
Method Detail

isGreaterThan

public boolean isGreaterThan(Version otherVersion)
Indicate if the version is greater than an other version.

Parameters:
otherVersion - The version we want to compare to
Returns:
true if the current version is greater than the other else false

getVersion

public String getVersion()
Returns the string version.

Returns:
The version

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

compareTo

public int compareTo(Version o)
Specified by:
compareTo in interface Comparable<Version>


Copyright © 2010 JTheque. All Rights Reserved.