aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com')
-rw-r--r--src/java/com/jogamp/common/util/VersionNumber.java6
-rw-r--r--src/java/com/jogamp/common/util/VersionNumberString.java3
2 files changed, 8 insertions, 1 deletions
diff --git a/src/java/com/jogamp/common/util/VersionNumber.java b/src/java/com/jogamp/common/util/VersionNumber.java
index 806c187..db40a90 100644
--- a/src/java/com/jogamp/common/util/VersionNumber.java
+++ b/src/java/com/jogamp/common/util/VersionNumber.java
@@ -38,6 +38,9 @@ import java.util.regex.Matcher;
*/
public class VersionNumber implements Comparable<Object> {
+ /** A {@link #isZero() zero} version instance. */
+ public static final VersionNumber zeroVersion = new VersionNumber(0, 0, 0);
+
protected final int major, minor, sub;
/** Explicit version number instantiation. */
@@ -80,7 +83,8 @@ public class VersionNumber implements Comparable<Object> {
minor = val[1];
sub = val[2];
}
-
+
+ /** Returns <code>true</code>, if all version components are zero, otherwise <code>false</code>. */
public final boolean isZero() {
return major == 0 && minor == 0 && sub == 0;
}
diff --git a/src/java/com/jogamp/common/util/VersionNumberString.java b/src/java/com/jogamp/common/util/VersionNumberString.java
index 342fa9a..7e68aea 100644
--- a/src/java/com/jogamp/common/util/VersionNumberString.java
+++ b/src/java/com/jogamp/common/util/VersionNumberString.java
@@ -34,6 +34,9 @@ package com.jogamp.common.util;
*/
public class VersionNumberString extends VersionNumber {
+ /** A {@link #isZero() zero} version instance. */
+ public static final VersionNumberString zeroVersion = new VersionNumberString(0, 0, 0, "n/a");
+
protected final String strVal;
public VersionNumberString(int majorRev, int minorRev, int subMinorRev, String versionString) {