Class AbstractDeclaredEffectiveStatement.DefaultArgument.WithSubstatements<A,D extends DeclaredStatement<A>>
java.lang.Object
org.opendaylight.yangtools.yang.model.api.meta.AbstractEffectiveStatement<A,D>
org.opendaylight.yangtools.yang.model.spi.meta.AbstractDeclaredEffectiveStatement<A,D>
org.opendaylight.yangtools.yang.model.spi.meta.AbstractDeclaredEffectiveStatement.Default<A,D>
org.opendaylight.yangtools.yang.model.spi.meta.AbstractDeclaredEffectiveStatement.DefaultArgument<A,D>
org.opendaylight.yangtools.yang.model.spi.meta.AbstractDeclaredEffectiveStatement.DefaultArgument.WithSubstatements<A,D>
- All Implemented Interfaces:
EffectiveStatement<A,
,D> ModelStatement<A>
- Direct Known Subclasses:
DeviateEffectiveStatementImpl
,DeviationEffectiveStatementImpl
,ImportEffectiveStatementImpl
,RefineEffectiveStatementImpl
,RegularArgumentEffectiveStatement
,RegularBaseEffectiveStatement
,RegularBelongsToEffectiveStatement
,RegularConfigEffectiveStatement
,RegularContactEffectiveStatement
,RegularDefaultEffectiveStatement
,RegularDescriptionEffectiveStatement
,RegularEnumEffectiveStatement
,RegularErrorAppTagEffectiveStatement
,RegularErrorMessageEffectiveStatement
,RegularFractionDigitsEffectiveStatement
,RegularIfFeatureEffectiveStatement
,RegularIncludeEffectiveStatement
,RegularLengthEffectiveStatement
,RegularMandatoryEffectiveStatement
,RegularMaxElementsEffectiveStatement
,RegularMinElementsEffectiveStatement
,RegularModifierEffectiveStatement
,RegularMustEffectiveStatement
,RegularNamespaceEffectiveStatement
,RegularOrderedByEffectiveStatement
,RegularOrganizationEffectiveStatement
,RegularPathEffectiveStatement
,RegularPatternEffectiveStatement
,RegularPositionEffectiveStatement
,RegularPrefixEffectiveStatement
,RegularPresenceEffectiveStatement
,RegularRangeEffectiveStatement
,RegularReferenceEffectiveStatement
,RegularRequireInstanceEffectiveStatement
,RegularRevisionDateEffectiveStatement
,RegularRevisionEffectiveStatement
,RegularStatusEffectiveStatement
,RegularUnitsEffectiveStatement
,RegularValueEffectiveStatement
,RegularWhenEffectiveStatement
,RegularYangVersionEffectiveStatement
,RegularYinElementEffectiveStatement
,TypedefEffectiveStatementImpl
- Enclosing class:
- AbstractDeclaredEffectiveStatement.DefaultArgument<A,
D extends DeclaredStatement<A>>
public abstract static class AbstractDeclaredEffectiveStatement.DefaultArgument.WithSubstatements<A,D extends DeclaredStatement<A>>
extends AbstractDeclaredEffectiveStatement.DefaultArgument<A,D>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opendaylight.yangtools.yang.model.spi.meta.AbstractDeclaredEffectiveStatement.DefaultArgument
AbstractDeclaredEffectiveStatement.DefaultArgument.WithSubstatements<A,
D extends DeclaredStatement<A>> Nested classes/interfaces inherited from class org.opendaylight.yangtools.yang.model.spi.meta.AbstractDeclaredEffectiveStatement
AbstractDeclaredEffectiveStatement.Default<A,
D extends DeclaredStatement<A>>, AbstractDeclaredEffectiveStatement.DefaultArgument<A, D extends DeclaredStatement<A>>, AbstractDeclaredEffectiveStatement.DefaultWithArgument<A, D extends DeclaredStatement<A>>, AbstractDeclaredEffectiveStatement.DefaultWithDataTree<A, D extends DeclaredStatement<A>>, AbstractDeclaredEffectiveStatement.DefaultWithSchemaTree<A, D extends DeclaredStatement<A>>, AbstractDeclaredEffectiveStatement.WithDataTree<A, D extends DeclaredStatement<A>>, AbstractDeclaredEffectiveStatement.WithSchemaTree<A, D extends DeclaredStatement<A>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
WithSubstatements
(D declared, ImmutableList<? extends EffectiveStatement<?, ?>> substatements) protected
WithSubstatements
(AbstractDeclaredEffectiveStatement.DefaultArgument.WithSubstatements<A, D> original) -
Method Summary
Modifier and TypeMethodDescriptionprotected MoreObjects.ToStringHelper
protected static @NonNull Map<QName,
DataTreeEffectiveStatement<?>> createDataTreeNamespace
(Collection<SchemaTreeEffectiveStatement<?>> schemaTreeStatements, Map<QName, SchemaTreeEffectiveStatement<?>> schemaTreeNamespace) protected static @NonNull Map<QName,
SchemaTreeEffectiveStatement<?>> createSchemaTreeNamespace
(Collection<? extends EffectiveStatement<?, ?>> substatements) Create a Map containing the contents of the schema tree.protected static @NonNull HashMap<QName,
TypedefEffectiveStatement> createTypedefNamespace
(Collection<? extends EffectiveStatement<?, ?>> substatements) final ImmutableList<? extends EffectiveStatement<?,
?>> Returns a collection of all effective substatements.final boolean
final int
hashCode()
protected static <T extends SchemaTreeEffectiveStatement<?>>
@NonNull Map<QName,T> immutableNamespaceOf
(Map<QName, T> map) protected static final @NonNull Object
maskList
(ImmutableList<?> list) Utility method for squashing singleton lists into single objects.protected static final @NonNull Object
maskSet
(ImmutableSet<?> set) final String
toString()
protected static final <T> @NonNull ImmutableList<T>
unmaskList
(@NonNull Object masked, @NonNull Class<T> type) Utility method for recovering singleton lists squashed bymaskList(ImmutableList)
.protected static final <T> @NonNull ImmutableSet<T>
Methods inherited from class org.opendaylight.yangtools.yang.model.spi.meta.AbstractDeclaredEffectiveStatement.DefaultArgument
argument
Methods inherited from class org.opendaylight.yangtools.yang.model.spi.meta.AbstractDeclaredEffectiveStatement.Default
getDeclared
Methods inherited from class org.opendaylight.yangtools.yang.model.api.meta.AbstractEffectiveStatement
filterOptional, findValue, unmaskList
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement
collectEffectiveSubstatements, findFirstEffectiveSubstatement, findFirstEffectiveSubstatementArgument, statementOrigin, streamEffectiveSubstatements
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.meta.ModelStatement
statementDefinition
-
Constructor Details
-
WithSubstatements
protected WithSubstatements(D declared, ImmutableList<? extends EffectiveStatement<?, ?>> substatements) -
WithSubstatements
protected WithSubstatements(AbstractDeclaredEffectiveStatement.DefaultArgument.WithSubstatements<A, D> original)
-
-
Method Details
-
effectiveSubstatements
Description copied from interface:EffectiveStatement
Returns a collection of all effective substatements.- Specified by:
effectiveSubstatements
in interfaceEffectiveStatement<A,
D extends DeclaredStatement<A>> - Returns:
- collection of all effective substatements.
-
createSchemaTreeNamespace
protected static @NonNull Map<QName,SchemaTreeEffectiveStatement<?>> createSchemaTreeNamespace(Collection<? extends EffectiveStatement<?, ?>> substatements) Create a Map containing the contents of the schema tree. Retur- Parameters:
substatements
- Substatements to index- Returns:
- Index of the schema tree as a mutable Map
- Throws:
NullPointerException
- ifsubstatements
is null
-
createDataTreeNamespace
protected static @NonNull Map<QName,DataTreeEffectiveStatement<?>> createDataTreeNamespace(Collection<SchemaTreeEffectiveStatement<?>> schemaTreeStatements, Map<QName, SchemaTreeEffectiveStatement<?>> schemaTreeNamespace) -
immutableNamespaceOf
protected static <T extends SchemaTreeEffectiveStatement<?>> @NonNull Map<QName,T> immutableNamespaceOf(Map<QName, T> map) -
createTypedefNamespace
protected static @NonNull HashMap<QName,TypedefEffectiveStatement> createTypedefNamespace(Collection<? extends EffectiveStatement<?, ?>> substatements) -
hashCode
public final int hashCode() -
equals
-
toString
-
addToStringAttributes
-
maskList
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
-
unmaskList
protected static final <T> @NonNull ImmutableList<T> unmaskList(@NonNull Object masked, @NonNull Class<T> type) Utility method for recovering singleton lists squashed bymaskList(ImmutableList)
.- Parameters:
masked
- list to unmask- Returns:
- Unmasked list
- Throws:
NullPointerException
- if any argument is nullClassCastException
- if masked object does not match expected class
-
maskSet
-
unmaskSet
protected static final <T> @NonNull ImmutableSet<T> unmaskSet(@NonNull Object masked, @NonNull Class<T> type)
-