Add Uint constants 96/85096/3
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 13 Oct 2019 08:33:56 +0000 (10:33 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 13 Oct 2019 08:48:16 +0000 (10:48 +0200)
This adds TWO/TEN constants to all Uint types as well some more
javadocs.

JIRA: YANGTOOLS-1032
Change-Id: I66cce018e99fdbf4c4824415fe23f112f7e6ab53
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/Uint16.java
yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/Uint32.java
yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/Uint64.java
yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/Uint8.java

index e45d2440f7ace74cabd2aad76d157ec5754c5c79..91ae038dae4bbda18dd96ff90716d7dcfd48b28e 100644 (file)
@@ -71,8 +71,25 @@ public class Uint16 extends Number implements CanonicalValue<Uint16> {
 
     private static final Interner<Uint16> INTERNER = Interners.newWeakInterner();
 
+    /**
+     * Value of {@code 0}.
+     */
     public static final Uint16 ZERO = valueOf(0).intern();
+    /**
+     * Value of {@code 1}.
+     */
     public static final Uint16 ONE = valueOf(1).intern();
+    /**
+     * Value of {@code 2}.
+     */
+    public static final Uint16 TWO = valueOf(2).intern();
+    /**
+     * Value of {@code 10}.
+     */
+    public static final Uint16 TEN = valueOf(10).intern();
+    /**
+     * Value of {@code 65535}.
+     */
     public static final Uint16 MAX_VALUE = valueOf(MAX_VALUE_INT).intern();
 
     private final short value;
index 287597521d4f75f2daf3fb7a7d84a12df716f472..0fe1a913f48bd85608f00489fe2006f642b5ccc1 100644 (file)
@@ -72,8 +72,25 @@ public class Uint32 extends Number implements CanonicalValue<Uint32> {
 
     private static final Interner<Uint32> INTERNER = Interners.newWeakInterner();
 
+    /**
+     * Value of {@code 0}.
+     */
     public static final Uint32 ZERO = valueOf(0).intern();
+    /**
+     * Value of {@code 1}.
+     */
     public static final Uint32 ONE = valueOf(1).intern();
+    /**
+     * Value of {@code 2}.
+     */
+    public static final Uint32 TWO = valueOf(2).intern();
+    /**
+     * Value of {@code 10}.
+     */
+    public static final Uint32 TEN = valueOf(10).intern();
+    /**
+     * Value of {@code 4294967295}.
+     */
     public static final Uint32 MAX_VALUE = valueOf(MAX_VALUE_LONG).intern();
 
     private final int value;
index c3d91ab806480728d534a07ceb17dbb343b30c84..2be5479397820627d8cf089a09860ab9c6bb0fbf 100644 (file)
@@ -72,8 +72,25 @@ public class Uint64 extends Number implements CanonicalValue<Uint64> {
 
     private static final Interner<Uint64> INTERNER = Interners.newWeakInterner();
 
+    /**
+     * Value of {@code 0}.
+     */
     public static final Uint64 ZERO = valueOf(0).intern();
+    /**
+     * Value of {@code 1}.
+     */
     public static final Uint64 ONE = valueOf(1).intern();
+    /**
+     * Value of {@code 2}.
+     */
+    public static final Uint64 TWO = valueOf(2).intern();
+    /**
+     * Value of {@code 10}.
+     */
+    public static final Uint64 TEN = valueOf(10).intern();
+    /**
+     * Value of {@code 18446744073709551615}.
+     */
     public static final Uint64 MAX_VALUE = fromLongBits(-1).intern();
 
     private final long value;
index 858c66c73a9ff8b0b79116b28d0a106a5b2339f2..27dc70c058e84d1c6ddef7ff90fd1a3ca75b814c 100644 (file)
@@ -55,8 +55,25 @@ public class Uint8 extends Number implements CanonicalValue<Uint8> {
         CACHE = c;
     }
 
+    /**
+     * Value of {@code 0}.
+     */
     public static final Uint8 ZERO = valueOf(0);
+    /**
+     * Value of {@code 1}.
+     */
     public static final Uint8 ONE = valueOf(1);
+    /**
+     * Value of {@code 2}.
+     */
+    public static final Uint8 TWO = valueOf(2);
+    /**
+     * Value of {@code 10}.
+     */
+    public static final Uint8 TEN = valueOf(10);
+    /**
+     * Value of {@code 255}.
+     */
     public static final Uint8 MAX_VALUE = valueOf(MAX_VALUE_SHORT);
 
     private final byte value;