Class YangTextSnippet

java.lang.Object
org.opendaylight.yangtools.yang.model.export.YangTextSnippet
All Implemented Interfaces:
Iterable<@NonNull String>, Immutable

@NonNullByDefault({PARAMETER,RETURN_TYPE}) public final class YangTextSnippet extends Object implements Immutable, Iterable<@NonNull String>
A YANG text snippet generated from a DeclaredStatement. Generated stream() or iterator() are guaranteed to not contain null nor empty strings. Furthermore, newlines are always emitted at the end on the generated string -- which can be checked with isEolString(String) utility method.

This allows individual strings to be escaped as needed and external indentation can be accounted for by inserting outer document indentation after the string which matched isEolString(String) is emitted to the stream.

Author:
Robert Varga