jACOB 2.7 API Documentation.

de.tif.jacob.core
Class Version

java.lang.Object
  extended by de.tif.jacob.core.Version
All Implemented Interfaces:
java.lang.Comparable

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

This class defines a software version used for jACOB applications and the jACOB application server itself.


Field Summary
static Version ADMIN
          The version of the jACOB admin application.
static Version ENGINE
          The version of the jACOB application server.
static java.lang.String ENGINE_NAME
          The name of the jACOB application server.
static boolean IS_OPEN_ENGINE
          Flag whether this jACOB application server is the open version.
static java.lang.String RCS_ID
          The internal revision control system id.
static java.lang.String RCS_REV
          The internal revision control system id in short form.
 
Constructor Summary
Version(int major, int minor)
          Constructs a new version instance consisting of a major and minor version number.
 
Method Summary
 int compareTo(java.lang.Object o)
           
 boolean equals(java.lang.Object anObject)
           
 int getMajor()
          Returns the major version number.
 int getMinor()
          Returns the minor version number.
 int hashCode()
           
 boolean isCompatible(Version v)
          True if 'this' version is compatible with the hands over version.
 boolean isGreaterOrEqual(Version v)
          Compares whether this version is greater or equal to a given version.
 boolean isPerfect(Version v)
           
static void main(java.lang.String[] args)
          Internal method needed by the jacapp ant task.
static Version parseVersion(java.lang.String versionStr)
          Converts the given version string to a version instance.
 java.lang.String toString()
          Returns the version as a string.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

RCS_ID

public static final transient java.lang.String RCS_ID
The internal revision control system id.

See Also:
Constant Field Values

RCS_REV

public static final transient java.lang.String RCS_REV
The internal revision control system id in short form.

See Also:
Constant Field Values

ENGINE

public static final Version ENGINE
The version of the jACOB application server.


ENGINE_NAME

public static final java.lang.String ENGINE_NAME
The name of the jACOB application server.

See Also:
Constant Field Values

IS_OPEN_ENGINE

public static final boolean IS_OPEN_ENGINE
Flag whether this jACOB application server is the open version.


ADMIN

public static final Version ADMIN
The version of the jACOB admin application.

Constructor Detail

Version

public Version(int major,
               int minor)
Constructs a new version instance consisting of a major and minor version number.

Parameters:
major - major version number
minor - minor version number
Method Detail

isGreaterOrEqual

public boolean isGreaterOrEqual(Version v)
Compares whether this version is greater or equal to a given version.

Parameters:
v - the version to compare
Returns:
true if 'this' version is greater or equal 'v'

isCompatible

public boolean isCompatible(Version v)
True if 'this' version is compatible with the hands over version.
this=1.1 v=1.0 -> false;
this=1.1 v=1.1 -> true;
this=1.1 v=1.2 -> true;
this=1.1 v=2.0 -> false;

Parameters:
v - the version to compare compatibility
Returns:
true if 'this' version is compatible with the hands over version.

isPerfect

public boolean isPerfect(Version v)
Parameters:
v -
Returns:
true if the version has a perfect match.

parseVersion

public static Version parseVersion(java.lang.String versionStr)
Converts the given version string to a version instance.

Parameters:
versionStr - the version string
Returns:
the resulting version instance

getMajor

public int getMajor()
Returns the major version number.

Returns:
the major version number

getMinor

public int getMinor()
Returns the minor version number.

Returns:
the minor version number

toString

public java.lang.String toString()
Returns the version as a string.

Overrides:
toString in class java.lang.Object
Returns:
the version string
See Also:
Object.toString()

equals

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

hashCode

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

compareTo

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

main

public static void main(java.lang.String[] args)
Internal method needed by the jacapp ant task.


jACOB 2.7 API Documentation.