jxl.version
Class Version

java.lang.Object
  extended by jxl.version.Version
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class Version
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

Comparable object containing a version number. Version implements the Comparable shorterface and overrides toString() with a concice human readable output. Each constructor to Version requires a short indicating the range of the version. Legal arguments are Version.EARLIER, Version.EXACT, and Version.LATTER.

Author:
Administrator
See Also:
Serialized Form

Field Summary
static short MAX_REV_VAL
           
 
Constructor Summary
Version()
           
Version(short rev1)
          Creates a Version of vrev1.X
Version(short rev1, short rev2)
          Creates a Version of vrev1.rev2.X
Version(short rev1, short rev2, short rev3)
          Creates a Version of vrev1.rev2.rev3_X
Version(short rev1, short rev2, short rev3, short rev4)
          Creates a Version of vrev1.rev2.rev3_rev4
 
Method Summary
 int compareTo(java.lang.Object o)
          Compares this Version to other if other is of type Version
 int compareTo(Version v)
           
 boolean equals(java.lang.Object o)
           
 short getPrimaryVersion()
           
 short getSecondaryVersion()
           
 short getTersiaryVersion()
           
 short getTetranryVersion()
           
 int hashCode()
           
static Version parseVersion(long l)
           
static Version parseVersion(java.lang.String version)
           
 long toLong()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_REV_VAL

public static final short MAX_REV_VAL
See Also:
Constant Field Values
Constructor Detail

Version

public Version(short rev1)
Creates a Version of vrev1.X


Version

public Version(short rev1,
               short rev2)
Creates a Version of vrev1.rev2.X


Version

public Version(short rev1,
               short rev2,
               short rev3)
Creates a Version of vrev1.rev2.rev3_X


Version

public Version(short rev1,
               short rev2,
               short rev3,
               short rev4)
Creates a Version of vrev1.rev2.rev3_rev4


Version

public Version()
Method Detail

parseVersion

public static Version parseVersion(java.lang.String version)

getPrimaryVersion

public short getPrimaryVersion()

getSecondaryVersion

public short getSecondaryVersion()

getTersiaryVersion

public short getTersiaryVersion()

getTetranryVersion

public short getTetranryVersion()

compareTo

public int compareTo(java.lang.Object o)
Compares this Version to other if other is of type Version

Specified by:
compareTo in interface java.lang.Comparable

toLong

public long toLong()

parseVersion

public static Version parseVersion(long l)

compareTo

public int compareTo(Version v)
              throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

hashCode

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

equals

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

toString

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