Module org.firebirdsql.jaybird
Package org.firebirdsql.gds.ng

# Class OdsVersion

java.lang.Object
org.firebirdsql.gds.ng.OdsVersion

All Implemented Interfaces:
  `Comparable<OdsVersion>`

public final class OdsVersion extends Object implements Comparable<OdsVersion>
Value class representing the Firebird On-Disk Structure (ODS) version.

Since:
  6
Author:
  Mark Rotteveel

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `compareTo(OdsVersion o)`
  `boolean`
  `equals(Object obj)`
  `int`
  `hashCode()`
  `int`
  `major()`
  `int`
  `minor()`
  `static OdsVersion`
  `none()`
  `static OdsVersion`
  `of(int major, int minor)`
  Returns a - possibly cached - instance with the specified major and minor version.
  `String`
  `toString()`
  `OdsVersion`
  `withMajor(int major)`
  Returns a - possibly cached - instance with the specified major version and the minor version of this instance.
  `OdsVersion`
  `withMinor(int minor)`
  Returns a - possibly cached - instance with the major version of this instance and the specified minor version.

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### of

    public static OdsVersion of(int major, int minor)
    Returns a - possibly cached - instance with the specified major and minor version.
    Parameters:
      `major` - ODS major version
      `minor` - ODS minor version
    Returns:
      ODS version instance

  - ### none

    public static OdsVersion none()
    Returns:
      an ODS version object with major `0` and minor `0`

  - ### major

    public int major()
    Returns:
      ODS major version

  - ### minor

    public int minor()
    Returns:
      ODS minor version

  - ### withMajor

    public OdsVersion withMajor(int major)
    Returns a - possibly cached - instance with the specified major version and the minor version of this instance.
    Parameters:
      `major` - ODS major version
    Returns:
      instance with value of parameter `major` and `minor()` of this instance

  - ### withMinor

    public OdsVersion withMinor(int minor)
    Returns a - possibly cached - instance with the major version of this instance and the specified minor version.
    Parameters:
      `minor` - ODS minor version
    Returns:
      instance with `major()` of this instance and value of parameter `minor`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### compareTo

    public int compareTo(OdsVersion o)
    Specified by:
      `compareTo` in interface `Comparable<OdsVersion>`