tyrex.util
Class Version

java.lang.Object
  extended bytyrex.util.Version

public class Version
extends java.lang.Object

Prints version information to the console. To print version information from the command line:

java com.intalio.n3.util.Version

Version:
$Revision: 1.3 $ $Date: 2001/03/19 17:39:03 $
Author:
Assaf Arkin

Constructor Summary
Version()
           
 
Method Summary
static boolean isCompatibleWith(java.lang.String available, java.lang.String required)
          Returns true if the available version is compatible with the required version.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Version

public Version()
Method Detail

main

public static void main(java.lang.String[] args)

isCompatibleWith

public static boolean isCompatibleWith(java.lang.String available,
                                       java.lang.String required)
Returns true if the available version is compatible with the required version. Compatibility is defined as the available version being equal to or larger than the required version.

A version string is made up of several numerical components with the most significant one coming first (e.g. 2.1.0 or 99/12/25). The version components are compared one by one starting with the most significant. All version components are compared, if they are missing in their version, zero is assumed (2.1 is equivalent to 2.1.0.0).

Available version 2.x will be compatible with required version 1.x, 1.0 and 1 (the last two are the same) but not with required version 3.x. 2.x will be compatible with 2.y if x and y are independently compatible according to the same rules.

The supported version separators are . , / -.

True: available >= required

Parameters:
available - The available version number
required - The ninimum required version number
Returns:
True if available equals to or larger than the required


Original code is Copyright (c) 1999-2001, Intalio, Inc. All Rights Reserved. Contributions by MetaBoss team are Copyright (c) 2003-2005, Softaris Pty. Ltd. All Rights Reserved.