A
- Argument type (Void
if statement does not have argument.)D
- Class representing declared version of this statement.public abstract class EffectiveStatementBase<A,D extends DeclaredStatement<A>> extends AbstractEffectiveStatement<A,D>
AbstractEffectiveStatement
, which holds substatements in an ImmutableList
.Modifier | Constructor and Description |
---|---|
protected |
EffectiveStatementBase(StmtContext<A,D,?> ctx)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
<T> Collection<T> |
allSubstatementsOfType(Class<T> type) |
Collection<? extends EffectiveStatement<?,?>> |
effectiveSubstatements()
Returns a collection of all effective substatements.
|
protected EffectiveStatement<?,?> |
firstEffectiveSubstatementOfType(Class<?> type) |
protected <S extends SchemaNode> |
firstSchemaNode(Class<S> type) |
protected <R> R |
firstSubstatementOfType(Class<?> type,
Class<R> returnType) |
protected <T> T |
firstSubstatementOfType(Class<T> type) |
protected Collection<? extends EffectiveStatement<?,?>> |
initSubstatements(Collection<? extends StmtContext<?,?,?>> substatementsInit)
Create a set of substatements.
|
protected Collection<? extends EffectiveStatement<?,?>> |
initSubstatements(StmtContext<A,D,?> ctx,
Collection<? extends StmtContext<?,?,?>> substatementsInit) |
protected static @NonNull Object |
maskList(ImmutableList<?> list)
Utility method for squashing singleton lists into single objects.
|
protected static <T> @NonNull ImmutableList<T> |
unmaskList(@NonNull Object masked,
@NonNull Class<T> type)
Utility method for recovering singleton lists squashed by
maskList(ImmutableList) . |
get, getAll, getNamespaceContents, unmaskList
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
findAll, findFirstEffectiveSubstatement, findFirstEffectiveSubstatementArgument, getDeclared, streamEffectiveSubstatements
argument, getStatementSource, statementDefinition
protected EffectiveStatementBase(StmtContext<A,D,?> ctx)
ctx
- context of statement.@Beta protected Collection<? extends EffectiveStatement<?,?>> initSubstatements(StmtContext<A,D,?> ctx, Collection<? extends StmtContext<?,?,?>> substatementsInit)
protected Collection<? extends EffectiveStatement<?,?>> initSubstatements(Collection<? extends StmtContext<?,?,?>> substatementsInit)
substatementsInit
- proposed substatementspublic final Collection<? extends EffectiveStatement<?,?>> effectiveSubstatements()
EffectiveStatement
effectiveSubstatements
in interface EffectiveStatement<A,D extends DeclaredStatement<A>>
effectiveSubstatements
in class AbstractEffectiveStatement<A,D extends DeclaredStatement<A>>
public final <T> Collection<T> allSubstatementsOfType(Class<T> type)
protected final <T> T firstSubstatementOfType(Class<T> type)
protected final <R> R firstSubstatementOfType(Class<?> type, Class<R> returnType)
protected final EffectiveStatement<?,?> firstEffectiveSubstatementOfType(Class<?> type)
protected final <S extends SchemaNode> S firstSchemaNode(Class<S> type)
protected 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.