QNameModule/QName should implement Identifier 73/68673/2
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 24 Feb 2018 21:42:24 +0000 (22:42 +0100)
committerRobert Varga <nite@hq.sk>
Sun, 25 Feb 2018 18:49:20 +0000 (18:49 +0000)
These classes are inherently identifier-like, and hence should be
implementing Identifier concept.

Change-Id: Ic494ec42788a176555c56446105511bc4868fad8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/QName.java
yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/QNameModule.java

index 931be4437b5329c2b2278e855f23abc6b37fdf53..87577f0d0f5c60a1af3264145b7abed4d3b94dfe 100644 (file)
@@ -23,6 +23,7 @@ import java.util.regex.Pattern;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 import javax.annotation.RegEx;
+import org.opendaylight.yangtools.concepts.Identifier;
 import org.opendaylight.yangtools.concepts.Immutable;
 
 /**
@@ -49,7 +50,7 @@ import org.opendaylight.yangtools.concepts.Immutable;
  * affect equality and identity of two QNames and carry only information
  * which may be useful for serializers / deserializers.
  */
-public final class QName implements Immutable, Serializable, Comparable<QName> {
+public final class QName implements Immutable, Serializable, Comparable<QName>, Identifier {
     private static final Interner<QName> INTERNER = Interners.newWeakInterner();
     private static final long serialVersionUID = 5398411242927766414L;
 
index a8c10f97d4c98d808e8f8bbd94207eda4827491e..b415834e9e97574919e375e300638711d7c4236a 100644 (file)
@@ -19,9 +19,10 @@ import java.util.Objects;
 import java.util.Optional;
 import javax.annotation.Nullable;
 import org.eclipse.jdt.annotation.NonNull;
+import org.opendaylight.yangtools.concepts.Identifier;
 import org.opendaylight.yangtools.concepts.Immutable;
 
-public final class QNameModule implements Comparable<QNameModule>, Immutable, Serializable {
+public final class QNameModule implements Comparable<QNameModule>, Immutable, Serializable, Identifier {
     private static final Interner<QNameModule> INTERNER = Interners.newWeakInterner();
     private static final long serialVersionUID = 3L;