Class Version

  • All Implemented Interfaces:
    java.lang.Comparable<java.lang.Object>

    public class Version
    extends java.lang.Object
    implements java.lang.Comparable<java.lang.Object>
    Represents a Versionnumber. This is primary used for eCheck and maybe not compatible with the magellan version number, because this version number contains Strings (f.e. 2.0.alpha). In this case you have to call the second constructor that doesn't convert the version number into integers.
    Version:
    $Revision: 171 $
    Author:
    $Author: $
    • Constructor Summary

      Constructors 
      Constructor Description
      Version​(java.lang.String str, java.lang.String delim)
      Creates a new Version object.
      Version​(java.lang.String str, java.lang.String delim, boolean checkInteger)
      Creates a new Version object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(java.lang.Object o)
      Compares this object with the specified object for order.
      java.lang.String getBuild()
      Returns the Build Version Number
      java.lang.String getMajor()
      Returns the Major Version Number
      java.lang.String getMinor()
      Returns the Minor Version Number
      boolean isNewer​(Version aVersion)
      Returns true if this version is strictly greater the aVersion.
      java.lang.String toString()
      Returns the Versionnumber in the Form Major.Minor.Build
      java.lang.String toString​(java.lang.String delim)
      Returns the Versionnumber in the Form Major.Minor.Build
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Version

        public Version​(java.lang.String str,
                       java.lang.String delim)
                throws java.lang.NumberFormatException
        Creates a new Version object.
        Throws:
        java.lang.NumberFormatException - If the given String cannot be parsed into a Version-Number
      • Version

        public Version​(java.lang.String str,
                       java.lang.String delim,
                       boolean checkInteger)
                throws java.lang.NumberFormatException
        Creates a new Version object.
        Throws:
        java.lang.NumberFormatException
    • Method Detail

      • getMajor

        public java.lang.String getMajor()
        Returns the Major Version Number
      • getMinor

        public java.lang.String getMinor()
        Returns the Minor Version Number
      • getBuild

        public java.lang.String getBuild()
        Returns the Build Version Number
      • toString

        public java.lang.String toString()
        Returns the Versionnumber in the Form Major.Minor.Build
        Overrides:
        toString in class java.lang.Object
      • toString

        public java.lang.String toString​(java.lang.String delim)
        Returns the Versionnumber in the Form Major.Minor.Build
      • compareTo

        public int compareTo​(java.lang.Object o)
        Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
        Specified by:
        compareTo in interface java.lang.Comparable<java.lang.Object>
        See Also:
        Comparable.compareTo(Object)
      • isNewer

        public boolean isNewer​(Version aVersion)
        Returns true if this version is strictly greater the aVersion.