@Beta public abstract class AbstractDeclaredStatement<A> extends Object implements DeclaredStatement<A>
DeclaredStatement
implementations. This is a direct competition to
AbstractDeclaredStatement
, providing lower-footprint
implementations.Modifier and Type | Class and Description |
---|---|
static class |
AbstractDeclaredStatement.ArgumentToString<A> |
static class |
AbstractDeclaredStatement.WithArgument<A> |
static class |
AbstractDeclaredStatement.WithQNameArgument |
static class |
AbstractDeclaredStatement.WithRawArgument<A> |
static class |
AbstractDeclaredStatement.WithRawStringArgument |
Modifier | Constructor and Description |
---|---|
protected |
AbstractDeclaredStatement() |
Modifier and Type | Method and Description |
---|---|
Collection<? extends DeclaredStatement<?>> |
declaredSubstatements()
Returns collection of explicitly declared child statements, while preserving its original ordering from original
source.
|
StatementSource |
getStatementSource()
Returns statement source, which denotes if statement was
explicitly declared in original model or inferred during
semantic processing of model.
|
protected static @NonNull Object |
maskList(ImmutableList<?> list)
Utility method for squashing singleton lists into single objects.
|
protected static @NonNull ImmutableList<? extends DeclaredStatement<?>> |
unmaskList(@NonNull Object masked)
Utility method for recovering singleton lists squashed by
maskList(ImmutableList) . |
protected static <T> @NonNull ImmutableList<T> |
unmaskList(@NonNull Object masked,
@NonNull Class<T> type)
Utility method for recovering singleton lists squashed by
maskList(ImmutableList) . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
declaredSubstatements, findFirstDeclaredSubstatement, findFirstDeclaredSubstatementArgument, rawArgument, streamDeclaredSubstatements
argument, statementDefinition
public final StatementSource getStatementSource()
ModelStatement
getStatementSource
in interface ModelStatement<A>
public Collection<? extends DeclaredStatement<?>> declaredSubstatements()
DeclaredStatement
declaredSubstatements
in interface DeclaredStatement<A>
protected static final @NonNull ImmutableList<? extends DeclaredStatement<?>> unmaskList(@NonNull Object masked)
maskList(ImmutableList)
.masked
- list to unmaskNullPointerException
- if masked is nullClassCastException
- if masked object does not match DeclaredStatementprotected static final @NonNull Object maskList(ImmutableList<?> list)
list
- list to maskNullPointerException
- if list is nullprotected static final <T> @NonNull ImmutableList<T> unmaskList(@NonNull Object masked, @NonNull Class<T> type)
maskList(ImmutableList)
.masked
- list to unmaskNullPointerException
- if any argument is nullClassCastException
- if masked object does not match expected classCopyright © 2020 OpenDaylight. All rights reserved.