DoxygenVersion

Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.doxygen.tools
Class DoxygenVersion

    java.lang.Object
      org.doxygen.tools.DoxygenVersion

All Implemented Interfaces:
  java.lang.Comparable

public class DoxygenVersion
extends java.lang.Object
implements java.lang.Comparable

This class provides Doxygen version comparison support.

Since:
  Ant-Doxygen 1.0
Version:
  $Revision: 1.2.4.5 $
Author:
  Karthik Kumar

Constructor Summary
`DoxygenVersion(java.lang.String releaseMajorMinor)` This constructor assumes a canonical Doxygen version string form.
`DoxygenVersion(java.lang.String releaseMajorMinor, int orderOfMagnitude)` This constructor parses each of the version components for subsequent version-version comparison.

Method Summary
`int` | `compareTo(java.lang.Object obj)` This method implements the compareTo() method from the Comparable interface.
`boolean` | `isCompatible(java.lang.String version)` To check if the given version is compatible with the current version.
`java.lang.String` | `toString()` This method provides a standard diagnostic method toString().

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### DoxygenVersion

    public DoxygenVersion(java.lang.String releaseMajorMinor,
                          int orderOfMagnitude)
                   throws java.lang.NumberFormatException

  This constructor parses each of the version components for subsequent version-version comparison. This class solves the normal `String` v. `int` collation / comparison issues at the version string level.

Parameters:
  `releaseMajorMinor` - string obtained from "Doxygen --version".
  `orderOfMagnitude` - or number of components in the version string.

### DoxygenVersion

    public DoxygenVersion(java.lang.String releaseMajorMinor)

  This constructor assumes a canonical Doxygen version string form. That being Release.Major.Minor.

Parameters:
  `releaseMajorMinor` - version string obtained from "Doxygen --version". The order of magnitude is assumed to be DEFAULT_MAGNITUDE.

Method Detail

### compareTo

    public final int compareTo(java.lang.Object obj)

  This method implements the compareTo() method from the Comparable interface.

  Specified by:
    `compareTo` in interface `java.lang.Comparable`
  Parameters:
    `obj` - instance to be compared against this instance.
  Returns:
    an `int` in the following range:
    - (1) - if this version is greater than obj version
    - (0) - if both versions are equal are equal.
    - (-1) - if this version is less than obj version, or if obj is not an instance of org.doxygen.tools.DoxygenVersion.

### isCompatible

    public boolean isCompatible(java.lang.String version)

  To check if the given version is compatible with the current version.

  Parameters:
    `version` - Version against which compatibility is to be checked.
  Returns:
    Returns true, if the argument version is ok against current version. false, otherwise.

### toString

    public final java.lang.String toString()

  This method provides a standard diagnostic method toString().

  Returns:
    Stringified form of the values contained by this instance.

Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Ant-Doxygen JavaDocs