org.exist.start
Class Version

java.lang.Object
  extended byorg.exist.start.Version

public class Version
extends java.lang.Object

Utility class for parsing and comparing version strings. JDK 1.1 compatible.

Author:
Jan Hlavat�

Constructor Summary
Version()
           
Version(java.lang.String version_string)
           
 
Method Summary
 int compare(Version other)
          Compares with other version.
 boolean isInRange(Version low, Version high)
          Check whether this verion is in range of versions specified
 void parse(java.lang.String version_string)
          parses version string in the form version[.revision[.subrevision[extension]]] into this instance.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Version

public Version()

Version

public Version(java.lang.String version_string)
Method Detail

parse

public void parse(java.lang.String version_string)
parses version string in the form version[.revision[.subrevision[extension]]] into this instance.


toString

public java.lang.String toString()
Returns:
string representation of this version

compare

public int compare(Version other)
Compares with other version. Does not take extension into account, as there is no reliable way to order them.

Returns:
Constants.INFERIOR if this is older version that other, Constants.EQUAL if its same version, Constants.SUPERIOR if it's newer version than other

isInRange

public boolean isInRange(Version low,
                         Version high)
Check whether this verion is in range of versions specified



Copyright (C) Wolfgang Meier. All rights reserved.