org.glite.security.voms.service
Class Version.VersionNumber

java.lang.Object
  extended byorg.glite.security.voms.service.Version.VersionNumber
All Implemented Interfaces:
java.lang.Comparable
Enclosing class:
Version

public static final class Version.VersionNumber
extends java.lang.Object
implements java.lang.Comparable

A class representing version numbers.


Constructor Summary
Version.VersionNumber(int major, int minor, int patch, java.lang.String build)
          Set up a new VersionNumber by building it up from the given component numbers.
Version.VersionNumber(java.lang.String version)
          Set up a new VersionNumber by parsing the given version string.
 
Method Summary
 int compareTo(java.lang.Object other)
          Compare this object with the specified object for order.
 boolean equals(java.lang.Object other)
          Compare this VersioNumber to the specified object.
 java.lang.String getBuild()
           
 int getMajor()
          Return the first component of the version number, or -1 if it could not be interpreted.
 int getMinor()
          Return the middle component of the version number, or -1 if it could not be interpreted.
 int getPatch()
          Return the last component of the version number, or -1 if it could not be interpreted.
 java.lang.String getShortVersion()
          Return the version number without the build component.
 java.lang.String toString()
          Return the short version number.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Version.VersionNumber

public Version.VersionNumber(int major,
                             int minor,
                             int patch,
                             java.lang.String build)
Set up a new VersionNumber by building it up from the given component numbers.


Version.VersionNumber

public Version.VersionNumber(java.lang.String version)
Set up a new VersionNumber by parsing the given version string.

Method Detail

toString

public java.lang.String toString()
Return the short version number.


getShortVersion

public java.lang.String getShortVersion()
Return the version number without the build component.


getMajor

public int getMajor()
Return the first component of the version number, or -1 if it could not be interpreted.


getMinor

public int getMinor()
Return the middle component of the version number, or -1 if it could not be interpreted.


getPatch

public int getPatch()
Return the last component of the version number, or -1 if it could not be interpreted.


getBuild

public java.lang.String getBuild()

equals

public boolean equals(java.lang.Object other)
Compare this VersioNumber to the specified object.


compareTo

public int compareTo(java.lang.Object other)
Compare this object with the specified object for order.

Specified by:
compareTo in interface java.lang.Comparable