@Beta @ThreadSafe @NonNullByDefault(value={PARAMETER,RETURN_TYPE}) public final class YangTextSnippet extends Object implements Immutable, Iterable<String>
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.
Modifier and Type | Method and Description |
---|---|
static boolean |
isEolString(String str)
Check if an emitted string contains End-Of-Line character.
|
Iterator<String> |
iterator() |
Spliterator<String> |
spliterator() |
Stream<String> |
stream() |
String |
toString() |
public Spliterator<String> spliterator()
spliterator
in interface Iterable<String>
public static boolean isEolString(String str)
str
- String to be checkedNullPointerException
- if str is nullCopyright © 2019 OpenDaylight. All rights reserved.