Class QNameModule

    • Method Detail

      • intern

        public @NonNull QNameModule intern()
        Return an interned reference to a equivalent QNameModule.
        Returns:
        Interned reference, or this object if it was interned.
      • create

        public static @NonNull QNameModule create​(URI namespace,
                                                  Optional<Revision> revision)
        Create a new QName module instance with specified namespace/revision.
        Parameters:
        namespace - Module namespace
        revision - Module revision
        Returns:
        A new, potentially shared, QNameModule instance
        Throws:
        NullPointerException - if any argument is null
      • create

        public static @NonNull QNameModule create​(URI namespace)
        Create a new QName module instance with specified namespace and no revision.
        Parameters:
        namespace - Module namespace
        Returns:
        A new, potentially shared, QNameModule instance
        Throws:
        NullPointerException - if namespace is null
      • create

        public static @NonNull QNameModule create​(URI namespace,
                                                  @Nullable Revision revision)
        Create a new QName module instance with specified namespace/revision.
        Parameters:
        namespace - Module namespace
        revision - Module revision
        Returns:
        A new, potentially shared, QNameModule instance
        Throws:
        NullPointerException - if any argument is null
      • readFrom

        public static @NonNull QNameModule readFrom​(DataInput in)
                                             throws IOException
        Read a QNameModule from a DataInput. The format is expected to match the output format of writeTo(DataOutput).
        Parameters:
        in - DataInput to read
        Returns:
        A QNameModule instance
        Throws:
        IOException - if I/O error occurs
      • getNamespace

        public @NonNull URI getNamespace()
        Returns the namespace of the module which is specified as argument of YANG Module namespace keyword.
        Returns:
        URI format of the namespace of the module
      • getRevision

        public @NonNull Optional<Revision> getRevision()
        Returns the revision date for the module.
        Returns:
        date of the module revision which is specified as argument of YANG Module revision keyword
      • withoutRevision

        public @NonNull QNameModule withoutRevision()
        Returns a QNameModule with the same namespace, but with no revision. If this QNameModule does not have a revision, this object is returned.
        Returns:
        a QNameModule with the same namespace, but with no revision.