Class AbstractEffectiveDocumentedNode<A,​D extends DeclaredStatement<A>>

    • Constructor Detail

      • AbstractEffectiveDocumentedNode

        protected AbstractEffectiveDocumentedNode​(StmtContext<A,​D,​?> ctx)
    • Method Detail

      • getDescription

        public final Optional<String> getDescription()
        Description copied from interface: DocumentedNode
        Returns the value of the argument of YANG description keyword.
        Specified by:
        getDescription in interface DocumentedNode
        Returns:
        string with the description, or empty if description was not provided.
      • getReference

        public final Optional<String> getReference()
        Description copied from interface: DocumentedNode
        Returns the value of the argument of YANG reference keyword.
        Specified by:
        getReference in interface DocumentedNode
        Returns:
        string with reference to some other document, or empty if reference was not provided.
      • nullableDescription

        protected final @Nullable String nullableDescription()
      • nullableReference

        protected final @Nullable String nullableReference()
      • maskList

        protected static final @NonNull Object maskList​(ImmutableList<?> list)
        Utility method for squashing singleton lists into single objects. This is a CPU/mem trade-off, which we are usually willing to make: for the cost of an instanceof check we can save one object and re-create it when needed. The inverse operation is #unmaskSubstatements(Object)}.
        Parameters:
        list - list to mask
        Returns:
        Masked list
        Throws:
        NullPointerException - if list is null
      • unmaskSet

        protected static final <T> @NonNull ImmutableSet<? extends T> unmaskSet​(@NonNull Object masked,
                                                                                @NonNull Class<T> type)