com.lc.util
Class Version

java.lang.Object
  |
  +--com.lc.util.Version
Direct Known Subclasses:
Version

public abstract class Version
extends java.lang.Object

Base class for version info.

Version:
$Revision: 1.1.1.1 $ $Date: 2002/02/19 22:12:03 $
Author:
Laurent Caillette

Constructor Summary
Version()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
abstract  int getBuild()
           
abstract  int getMajor()
           
abstract  int getMinor()
           
static Version parse(java.lang.String versionString)
          Parses a String containing some Version info in "Major.minor.build" form.
 java.lang.String toString()
          Returns a version in its "Major.minor.build" form.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Version

public Version()
Method Detail

getMajor

public abstract int getMajor()

getMinor

public abstract int getMinor()

getBuild

public abstract int getBuild()

toString

public final java.lang.String toString()
Returns a version in its "Major.minor.build" form.
Overrides:
toString in class java.lang.Object

equals

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

parse

public static final Version parse(java.lang.String versionString)
Parses a String containing some Version info in "Major.minor.build" form.
Parameters:
versionString - The String to parse.
Returns:
A valid AbstractVersion instance.
Throws:
java.lang.IllegalArgumentException - If there are not exactly 3 tokens separated by '.'.
java.lang.NumberFormatException - If one token does not represent an int value.