NextApp Echo
App Container 1.1.4

nextapp.echoservlet.util
Class Version

java.lang.Object
  extended bynextapp.echoservlet.util.Version

public final class Version
extends java.lang.Object

Utility class for comparing version numbers in String format. This class may be used to determine if a version number is greater than another to make a hypothesis about whether the version is compatible with a requirement.


Method Summary
static boolean meetsRequirement(java.lang.String requiredVersion, java.lang.String testVersion)
          Tests to see if a version number meets or exceeds a requirement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

meetsRequirement

public static final boolean meetsRequirement(java.lang.String requiredVersion,
                                             java.lang.String testVersion)
Tests to see if a version number meets or exceeds a requirement. For example, if version 1.4 is required, 1.4, 1.4.0, 1.4.1, 1.5, and 2.0 would meet the requirement. 0.7, 1, 1.0, 1.3, and 1.3.5 would not. Warning: At this time all versions must be numeric and separated by periods. Any deviation will result in .0 versions, such as 1.5.3b being calculated as 1.5.0.

Parameters:
requiredVersion - The version number that is required.
testVersion - The version number that is available.
Returns:
True if the tested version is equal to or higher than the requirement.

NextApp Echo
App Container 1.1.4