net.sourceforge.schemaspy.util
Class Version

java.lang.Object
  extended by net.sourceforge.schemaspy.util.Version
All Implemented Interfaces:
Comparable

public class Version
extends Object
implements Comparable

Simple class that allows logical comparisons between "dotted" versions of products. e.g. version 2.1.4 should be less than version 2.1.10.

Version:
1.0
Author:
John Currier

Constructor Summary
Version(String version)
           
 
Method Summary
 int compareTo(Object version)
          Compares this object with the specified object for order.
 boolean equals(Object other)
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Version

public Version(String version)
Method Detail

compareTo

public int compareTo(Object version)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Specified by:
compareTo in interface Comparable

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2010. All Rights Reserved.