Cleanup checkstyle in yang-{data,model}-api
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / type / IdentityrefTypeDefinition.java
index 4631e1db01525ff28c6bf32d24d3714c35340620..e4337d8539a2f60420aee4d423268eec52e1a0d0 100644 (file)
@@ -7,23 +7,32 @@
  */
 package org.opendaylight.yangtools.yang.model.api.type;
 
-import org.opendaylight.yangtools.yang.common.QName;
+import java.util.Set;
+import javax.annotation.Nonnull;
+import org.opendaylight.yangtools.yang.model.api.IdentitySchemaNode;
 import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
 
 /**
- * 
  * Contains method for getting data from <code>identityref</code> built-in YANG
  * type.
- * 
  */
 public interface IdentityrefTypeDefinition extends TypeDefinition<IdentityrefTypeDefinition> {
-
     /**
-     * Returns QName of the identity to which the instance of this type refers.
-     * 
-     * @return QName of referenced identity which is specified with the
-     *         <code>identity</code> YANG statement
+     * Returns identity to which the instance of this type refers.
+     *
+     * @deprecated use {@link #getIdentities()} instead
+     *
+     * @return identity which is specified with the <code>identity</code> YANG
+     *         statement
      */
-    public QName getIdentity();
+    @Deprecated
+    IdentitySchemaNode getIdentity();
 
+    /**
+     * Returns the set of identities this reference points to.
+     *
+     * @return set of identities to which the instance of this type refers (in YANG 1.1 models) or a set containing
+     *         just one identity (in YANG 1.0 models)
+     */
+    @Nonnull Set<IdentitySchemaNode> getIdentities();
 }