Documentation of 'jas2.util.pluginmanager.VersionNumberCompare' Java class
VersionNumberCompare
jas2.util.pluginmanager

Class VersionNumberCompare



  • public class VersionNumberCompare
    extends java.lang.Object
    This class is used to compare version numbers. The only method in this class converts both the currentversion and the latest version (method arguments) strings into string chunks (i.e. if string = 2.0.4, then ints are 2,0,4). The string chunks are then converted to ints and compared one at a time. If a latest version chunk is > than a current version chunk an update is available and UPDATEVERSION is returned. If all chunks are equal then NOUPDATEVERSION is available. If a latest chunk is < current chunk or Strings can't be converted to ints an Exception is thrown.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int compareVersions(java.lang.String currentversion, java.lang.String latestversion, boolean throwexception)
      This method converts both the currentversion and the latest version (method arguments) strings into string chunks (i.e.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VersionNumberCompare

        public VersionNumberCompare()
    • Method Detail

      • compareVersions

        public int compareVersions(java.lang.String currentversion,
                                   java.lang.String latestversion,
                                   boolean throwexception)
                            throws jas2.util.pluginmanager.VersionNumberCompare.VersionCompareException
        This method converts both the currentversion and the latest version (method arguments) strings into string chunks (i.e. if string = 2.0.4, then ints are 2,0,4). The string chunks are then converted to ints and compared one at a time. If a latest version chunk is > than a current version chunk an update is available and UPDATEVERSION is returned. If all chunks are equal then NOUPDATEVERSION is available. The boolean throw exception controls whether the VersionNumberCompare exception will be thrown when a latestversion chunk is less than a current version chunk.
        Throws:
        jas2.util.pluginmanager.VersionNumberCompare.VersionCompareException

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.