GlueGen: com.jogamp.common.util.VersionNumber Class Reference

GlueGen v2.6.0-rc-20250722 GlueGen, Native Binding Generator for Java™ (public API).

Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
com.jogamp.common.util.VersionNumber Class Reference

Simple version number class containing a version number either being `defined explicit` or `derived from a string`. More...

Inheritance diagram for com.jogamp.common.util.VersionNumber:
Collaboration diagram for com.jogamp.common.util.VersionNumber:

## Public Member Functions

| VersionNumber (final int majorRev, final int minorRev, final int subMinorRev)
| Explicit version number instantiation, with all components defined explicitly. More...
| VersionNumber (final int majorRev, final int minorRev)
| Explicit version number instantiation, with major and minor components defined explicitly, no sub. More...
| VersionNumber (final String versionString)
| String derived version number instantiation. More...
| VersionNumber (final String versionString, final String delim)
| String derived version number instantiation. More...
| VersionNumber (final String versionString, final java.util.regex.Pattern versionPattern)
| String derived version number instantiation. More...
final boolean | isZero ()
| Returns `true`, if all version components are zero, otherwise `false`. More...
final boolean | hasMajor ()
| Returns `true`, if the major component is defined explicitly, otherwise `false`. More...
final boolean | hasMinor ()
| Returns `true`, if the optional minor component is defined explicitly, otherwise `false`. More...
final boolean | hasSub ()
| Returns `true`, if the optional sub component is defined explicitly, otherwise `false`. More...
final int | endOfStringMatch ()
| If constructed with `version-string`, returns the string offset after the last matching character, or `0` if none matched, or `-1` if not constructed with a string. More...
final int | hashCode ()
final boolean | equals (final Object o)
final int | compareTo (final Object o)
final int | compareTo (final VersionNumber vo)
final int | getMajor ()
final int | getMinor ()
final int | getSub ()
String | toString ()

## Static Public Member Functions

static java.util.regex.Pattern | getVersionNumberPattern (final String delim)
| Returns the `pattern` with Perl regular expression: More...
static java.util.regex.Pattern | getDefaultVersionNumberPattern ()
| Returns the default `pattern` using `getVersionNumberPattern(String)` with delimiter "<b>.</b>". More...

## Static Public Attributes

static final VersionNumber | zeroVersion = new VersionNumber(0, 0, 0, -1, (short)0)
| A `zero` version instance, w/o any component defined explicitly. More...

## Protected Member Functions

| VersionNumber (final int majorRev, final int minorRev, final int subMinorRev, final int _strEnd, final short _state)

## Protected Attributes

final int | major
final int | minor
final int | sub
final int | strEnd
final short | state

## Static Protected Attributes

static final short | HAS_MAJOR = 1 << 0
static final short | HAS_MINOR = 1 << 1
static final short | HAS_SUB = 1 << 2

## Detailed Description

Simple version number class containing a version number either being `defined explicit` or `derived from a string`.

For the latter case, you can query whether a component has been defined explicitly by the given `versionString`, via `hasMajor()`, `hasMinor()` and `hasSub()`.

The state whether a component is defined explicitly is not considered in the `hashCode()`, `equals(Object)` or `compareTo(Object)` methods, since the version number itself is treated regardless.

Definition at line 47 of file VersionNumber.java.

## Constructor & Destructor Documentation

## ◆ VersionNumber() [1/6]

com.jogamp.common.util.VersionNumber.VersionNumber | ( | final int | majorRev,
|  | final int | minorRev,
|  | final int | subMinorRev,
|  | final int | _strEnd,
|  | final short | _state
| ) |  |

protected

Definition at line 105 of file VersionNumber.java.

## ◆ VersionNumber() [2/6]

com.jogamp.common.util.VersionNumber.VersionNumber | ( | final int | majorRev,
|  | final int | minorRev,
|  | final int | subMinorRev
| ) |  |

Explicit version number instantiation, with all components defined explicitly.

See also
  hasMajor()
  hasMinor()
  hasSub()

Definition at line 119 of file VersionNumber.java.

## ◆ VersionNumber() [3/6]

com.jogamp.common.util.VersionNumber.VersionNumber | ( | final int | majorRev,
|  | final int | minorRev
| ) |  |

Explicit version number instantiation, with major and minor components defined explicitly, no sub.

See also
  hasMajor()
  hasMinor()

Definition at line 128 of file VersionNumber.java.

## ◆ VersionNumber() [4/6]

com.jogamp.common.util.VersionNumber.VersionNumber | ( | final String | versionString | ) |

String derived version number instantiation.

Utilizing the default `pattern` parser with delimiter "<b>.</b>", see `getDefaultVersionNumberPattern()`.

You can query whether a component has been defined explicitly by the given `versionString`, via `hasMajor()`, `hasMinor()` and `hasSub()`.

Parameters

  versionString | should be given as [MAJOR[.MINOR[.SUB]]]

See also
  hasMajor()
  hasMinor()
  hasSub()

Definition at line 147 of file VersionNumber.java.

Here is the call graph for this function:

## ◆ VersionNumber() [5/6]

com.jogamp.common.util.VersionNumber.VersionNumber | ( | final String | versionString,
|  | final String | delim
| ) |  |

String derived version number instantiation.

Utilizing `pattern` parser created via `getVersionNumberPattern(String)`.

You can query whether a component has been defined explicitly by the given `versionString`, via `hasMajor()`, `hasMinor()` and `hasSub()`.

Parameters

  versionString | should be given as [MAJOR[.MINOR[.SUB]]]
  delim | the delimiter, e.g. "."

See also
  hasMajor()
  hasMinor()
  hasSub()

Definition at line 167 of file VersionNumber.java.

Here is the call graph for this function:

## ◆ VersionNumber() [6/6]

com.jogamp.common.util.VersionNumber.VersionNumber | ( | final String | versionString,
|  | final java.util.regex.Pattern | versionPattern
| ) |  |

String derived version number instantiation.

You can query whether a component has been defined explicitly by the given `versionString`, via `hasMajor()`, `hasMinor()` and `hasSub()`.

Parameters

  versionString | should be given as [MAJOR[.MINOR[.SUB]]]
  versionPattern | the `pattern` parser, must be compatible w/ `getVersionNumberPattern(String)`

See also
  hasMajor()
  hasMinor()
  hasSub()

Definition at line 184 of file VersionNumber.java.

## Member Function Documentation

## ◆ compareTo() [1/2]

final int com.jogamp.common.util.VersionNumber.compareTo | ( | final Object | o | ) |

Definition at line 253 of file VersionNumber.java.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ compareTo() [2/2]

final int com.jogamp.common.util.VersionNumber.compareTo | ( | final VersionNumber | vo | ) |

Definition at line 261 of file VersionNumber.java.

## ◆ endOfStringMatch()

final int com.jogamp.common.util.VersionNumber.endOfStringMatch | ( |  | ) |

If constructed with `version-string`, returns the string offset after the last matching character, or `0` if none matched, or `-1` if not constructed with a string.

Definition at line 234 of file VersionNumber.java.

## ◆ equals()

final boolean com.jogamp.common.util.VersionNumber.equals | ( | final Object | o | ) |

Definition at line 245 of file VersionNumber.java.

Here is the call graph for this function:

## ◆ getDefaultVersionNumberPattern()

static java.util.regex.Pattern com.jogamp.common.util.VersionNumber.getDefaultVersionNumberPattern | ( |  | ) |

static

Returns the default `pattern` using `getVersionNumberPattern(String)` with delimiter "<b>.</b>".

Instance is cached.

Definition at line 86 of file VersionNumber.java.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ getMajor()

final int com.jogamp.common.util.VersionNumber.getMajor | ( |  | ) |

Definition at line 278 of file VersionNumber.java.

## ◆ getMinor()

final int com.jogamp.common.util.VersionNumber.getMinor | ( |  | ) |

Definition at line 282 of file VersionNumber.java.

## ◆ getSub()

final int com.jogamp.common.util.VersionNumber.getSub | ( |  | ) |

Definition at line 286 of file VersionNumber.java.

## ◆ getVersionNumberPattern()

static java.util.regex.Pattern com.jogamp.common.util.VersionNumber.getVersionNumberPattern | ( | final String | delim | ) |

static

Returns the `pattern` with Perl regular expression:

      "\\D*(\\d+)[^\\"+delim+"\s]*(?:\"+delim+"\D*(\d+)[^\"+delim+"\s]*(?:\"+delim+"\D*(\d+))?)?"
    </pre>
    </p>
    <p>
    A whitespace within the version number will end the parser.
    </p>
    <p>
    Capture groups represent the major (1), optional minor (2) and optional sub version number (3) component in this order.
    </p>
    <p>
    Each capture group ignores any leading non-digit and uses only contiguous digits, i.e. ignores pending non-digits.
    </p>
    @param delim the delimiter, e.g. "."

Definition at line 75 of file VersionNumber.java.

Here is the caller graph for this function:

## ◆ hashCode()

final int com.jogamp.common.util.VersionNumber.hashCode | ( |  | ) |

Definition at line 237 of file VersionNumber.java.

## ◆ hasMajor()

final boolean com.jogamp.common.util.VersionNumber.hasMajor | ( |  | ) |

Returns `true`, if the major component is defined explicitly, otherwise `false`.

Undefined components has the value `0`.

Definition at line 224 of file VersionNumber.java.

Here is the caller graph for this function:

## ◆ hasMinor()

final boolean com.jogamp.common.util.VersionNumber.hasMinor | ( |  | ) |

Returns `true`, if the optional minor component is defined explicitly, otherwise `false`.

Undefined components has the value `0`.

Definition at line 226 of file VersionNumber.java.

Here is the caller graph for this function:

## ◆ hasSub()

final boolean com.jogamp.common.util.VersionNumber.hasSub | ( |  | ) |

Returns `true`, if the optional sub component is defined explicitly, otherwise `false`.

Undefined components has the value `0`.

Definition at line 228 of file VersionNumber.java.

Here is the caller graph for this function:

## ◆ isZero()

final boolean com.jogamp.common.util.VersionNumber.isZero | ( |  | ) |

Returns `true`, if all version components are zero, otherwise `false`.

Definition at line 219 of file VersionNumber.java.

## ◆ toString()

String com.jogamp.common.util.VersionNumber.toString | ( |  | ) |

Reimplemented in com.jogamp.common.util.VersionNumberString.

Definition at line 291 of file VersionNumber.java.

Here is the call graph for this function:

## Member Data Documentation

## ◆ HAS_MAJOR

final short com.jogamp.common.util.VersionNumber.HAS_MAJOR = 1 << 0

staticprotected

Definition at line 101 of file VersionNumber.java.

## ◆ HAS_MINOR

final short com.jogamp.common.util.VersionNumber.HAS_MINOR = 1 << 1

staticprotected

Definition at line 102 of file VersionNumber.java.

## ◆ HAS_SUB

final short com.jogamp.common.util.VersionNumber.HAS_SUB = 1 << 2

staticprotected

Definition at line 103 of file VersionNumber.java.

## ◆ major

final int com.jogamp.common.util.VersionNumber.major

protected

Definition at line 98 of file VersionNumber.java.

## ◆ minor

final int com.jogamp.common.util.VersionNumber.minor

protected

Definition at line 98 of file VersionNumber.java.

## ◆ state

final short com.jogamp.common.util.VersionNumber.state

protected

Definition at line 100 of file VersionNumber.java.

## ◆ strEnd

final int com.jogamp.common.util.VersionNumber.strEnd

protected

Definition at line 98 of file VersionNumber.java.

## ◆ sub

final int com.jogamp.common.util.VersionNumber.sub

protected

Definition at line 98 of file VersionNumber.java.

## ◆ zeroVersion

final VersionNumber com.jogamp.common.util.VersionNumber.zeroVersion = new VersionNumber(0, 0, 0, -1, (short)0)

static

A `zero` version instance, w/o any component defined explicitly.

See also
  hasMajor()
  hasMinor()
  hasSub()

Definition at line 55 of file VersionNumber.java.

The documentation for this class was generated from the following file:

- src/java/com/jogamp/common/util/VersionNumber.java