summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/util/VersionNumber.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-04-26 05:14:20 +0200
committerSven Gothel <[email protected]>2013-04-26 05:14:20 +0200
commitb5ede1f7779bb55e25df4a5724c72f79d8f96640 (patch)
tree7fac57669293627e6002b0adec27518b7fb323fb /src/java/com/jogamp/common/util/VersionNumber.java
parentef274002b64850b275fe9867026a89987b3169e0 (diff)
VersionNumber*: Add static final 'zeroVersion' for convenience and identity.
Diffstat (limited to 'src/java/com/jogamp/common/util/VersionNumber.java')
-rw-r--r--src/java/com/jogamp/common/util/VersionNumber.java6
1 files changed, 5 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;
}