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 8b567a716186aeacb16586141f03962d49937b53..e4337d8539a2f60420aee4d423268eec52e1a0d0 100644 (file)
@@ -7,23 +7,32 @@
  */
 package org.opendaylight.yangtools.yang.model.api.type;
 
+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 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
      */
+    @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();
 }