Interface DataObjectIdentifier<T extends DataObject>
- Type Parameters:
T
- type ofDataObject
held in the last step.
- All Superinterfaces:
BindingInstanceIdentifier
,DataObjectReference<T>
,Immutable
,PathLike
,Serializable
- All Known Subinterfaces:
DataObjectIdentifier.WithKey<T,
K>
- All Known Implementing Classes:
DataObjectIdentifierImpl
,DataObjectIdentifierWithKey
public sealed interface DataObjectIdentifier<T extends DataObject>
extends DataObjectReference<T>, BindingInstanceIdentifier
permits DataObjectIdentifier.WithKey<T,K>, DataObjectIdentifierImpl<T>
A
DataObjectReference
matching at most one DataObject
, consistent with YANG
instance-identifier
addressing as captured by BindingInstanceIdentifier
.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
DataObjectIdentifier.Builder<T extends DataObject>
A builder ofDataObjectReference
objects.static interface
DataObjectIdentifier.WithKey<T extends EntryObject<T,
K>, K extends Key<T>> ADataObjectIdentifier
pointing to anEntryObject
.Nested classes/interfaces inherited from interface org.opendaylight.yangtools.binding.BindingInstanceIdentifier
BindingInstanceIdentifier.Step
-
Method Summary
Modifier and TypeMethodDescriptionstatic <C extends ChoiceIn<? extends DataRoot<?>> & DataObject,
N extends EntryObject<N, K> & ChildOf<? super C>, K extends Key<N>>
@NonNull DataObjectIdentifier.Builder.WithKey<N, K> static <C extends ChoiceIn<? extends DataRoot<?>> & DataObject,
T extends ChildOf<? super C>>
@NonNull DataObjectIdentifier.Builder<T> static <T extends ChildOf<? extends DataRoot<?>>>
@NonNull DataObjectIdentifier.Builder<T> static <N extends EntryObject<N,
K> & ChildOf<? extends DataRoot<?>>, K extends Key<N>>
@NonNull DataObjectIdentifier.Builder.WithKey<N, K> static <R extends DataRoot<R>,
N extends EntryObject<N, K> & ChildOf<? super R>, K extends Key<N>>
@NonNull DataObjectIdentifier.Builder.WithKey<N, K> builderOfInherited
(@NonNull Class<R> root, @NonNull Class<N> listItem, @NonNull K listKey) static <R extends DataRoot<R>,
T extends ChildOf<? super R>>
@NonNull DataObjectIdentifier.Builder<T> builderOfInherited
(@NonNull Class<R> root, @NonNull Class<T> container) static <R extends DataRoot<R>,
C extends ChoiceIn<? super R> & DataObject, N extends EntryObject<N, K> & ChildOf<? super C>, K extends Key<N>>
@NonNull DataObjectIdentifier.Builder.WithKey<N, K> builderOfInherited
(Class<R> root, Class<C> caze, Class<N> listItem, K listKey) static <R extends DataRoot<R>,
C extends ChoiceIn<? super R> & DataObject, T extends ChildOf<? super C>>
@NonNull DataObjectIdentifier.Builder<T> builderOfInherited
(Class<R> root, Class<C> caze, Class<T> container) default boolean
isExact()
Returnstrue
if this reference is composed solely ofExactDataObjectStep
s.default boolean
Deprecated.static @NonNull DataObjectIdentifier
<?> ofUnsafeSteps
(ImmutableList<? extends @NonNull ExactDataObjectStep<?>> steps) static @NonNull DataObjectIdentifier
<?> ofUnsafeSteps
(Iterable<? extends @NonNull ExactDataObjectStep<?>> steps) static @NonNull DataObjectIdentifier
<?> ofUnsafeSteps
(List<? extends @NonNull ExactDataObjectStep<?>> steps) Iterable
<? extends @NonNull ExactDataObjectStep<?>> steps()
Return the steps of this reference.Create a newDataObjectReference.Builder
initialized to produce a reference equal to this one.default DataObjectIdentifier
<T> Deprecated, for removal: This API element is subject to removal in a future version.This method should not be directly invoked.default <I extends DataObject>
@NonNull DataObjectIdentifier<I> Returns this identifier's topmost (closest to the root) ancestor of specified type, throwingNoSuchElementException
if no such ancestor exists.<I extends DataObject>
@Nullable DataObjectIdentifier<I> Returns this identifier's topmost (closest to the root) ancestor of specified type.Methods inherited from interface org.opendaylight.yangtools.binding.DataObjectReference
builder, getPathArguments, lastStep, toLegacy
Methods inherited from interface org.opendaylight.yangtools.binding.PathLike
findFirstKeyOf, firstKeyOf, getFirstKeyOf
-
Method Details
-
ofUnsafeSteps
static @NonNull DataObjectIdentifier<?> ofUnsafeSteps(Iterable<? extends @NonNull ExactDataObjectStep<?>> steps) -
ofUnsafeSteps
static @NonNull DataObjectIdentifier<?> ofUnsafeSteps(List<? extends @NonNull ExactDataObjectStep<?>> steps) -
ofUnsafeSteps
static @NonNull DataObjectIdentifier<?> ofUnsafeSteps(ImmutableList<? extends @NonNull ExactDataObjectStep<?>> steps) -
builder
static <T extends ChildOf<? extends DataRoot<?>>> @NonNull DataObjectIdentifier.Builder<T> builder(@NonNull Class<T> container) -
builder
static <C extends ChoiceIn<? extends DataRoot<?>> & DataObject,T extends ChildOf<? super C>> @NonNull DataObjectIdentifier.Builder<T> builder(@NonNull Class<C> caze, @NonNull Class<T> container) -
builder
static <N extends EntryObject<N,K> & ChildOf<? extends DataRoot<?>>, @NonNull DataObjectIdentifier.Builder.WithKey<N,K extends Key<N>> K> builder(Class<N> listItem, K listKey) -
builder
static <C extends ChoiceIn<? extends DataRoot<?>> & DataObject,N extends EntryObject<N, @NonNull DataObjectIdentifier.Builder.WithKey<N,K> & ChildOf<? super C>, K extends Key<N>> K> builder(@NonNull Class<C> caze, @NonNull Class<N> listItem, @NonNull K listKey) -
builderOfInherited
static <R extends DataRoot<R>,T extends ChildOf<? super R>> @NonNull DataObjectIdentifier.Builder<T> builderOfInherited(@NonNull Class<R> root, @NonNull Class<T> container) -
builderOfInherited
static <R extends DataRoot<R>,C extends ChoiceIn<? super R> & DataObject, @NonNull DataObjectIdentifier.Builder<T> builderOfInheritedT extends ChildOf<? super C>> (Class<R> root, Class<C> caze, Class<T> container) -
builderOfInherited
static <R extends DataRoot<R>,N extends EntryObject<N, @NonNull DataObjectIdentifier.Builder.WithKey<N,K> & ChildOf<? super R>, K extends Key<N>> K> builderOfInherited(@NonNull Class<R> root, @NonNull Class<N> listItem, @NonNull K listKey) -
builderOfInherited
static <R extends DataRoot<R>,C extends ChoiceIn<? super R> & DataObject, @NonNull DataObjectIdentifier.Builder.WithKey<N,N extends EntryObject<N, K> & ChildOf<? super C>, K extends Key<N>> K> builderOfInherited(Class<R> root, Class<C> caze, Class<N> listItem, K listKey) -
steps
Iterable<? extends @NonNull ExactDataObjectStep<?>> steps()Description copied from interface:DataObjectReference
Return the steps of this reference. ReturnedIterable
does not support removals and contains one or more non-null items.- Specified by:
steps
in interfaceBindingInstanceIdentifier
- Specified by:
steps
in interfaceDataObjectReference<T extends DataObject>
- Returns:
- the steps of this reference
-
isExact
default boolean isExact()Description copied from interface:DataObjectReference
Returnstrue
if this reference is composed solely ofExactDataObjectStep
s.- Specified by:
isExact
in interfaceDataObjectReference<T extends DataObject>
- Returns:
true
if this reference is composed solely ofExactDataObjectStep
s
-
toBuilder
DataObjectIdentifier.Builder<T> toBuilder()Description copied from interface:DataObjectReference
Create a newDataObjectReference.Builder
initialized to produce a reference equal to this one.- Specified by:
toBuilder
in interfaceDataObjectReference<T extends DataObject>
- Returns:
- A builder instance
-
toIdentifier
Deprecated, for removal: This API element is subject to removal in a future version.This method should not be directly invoked.Returns this instance.- Specified by:
toIdentifier
in interfaceDataObjectReference<T extends DataObject>
- Returns:
- this instance
-
isWildcarded
Deprecated.Description copied from interface:DataObjectReference
Returnstrue
if this reference contains anInexactDataObjectStep
s.- Specified by:
isWildcarded
in interfaceDataObjectReference<T extends DataObject>
- Returns:
true
if this reference contains anInexactDataObjectStep
-
trimTo
default <I extends DataObject> @NonNull DataObjectIdentifier<I> trimTo(@NonNull Class<@NonNull I> type) Returns this identifier's topmost (closest to the root) ancestor of specified type, throwingNoSuchElementException
if no such ancestor exists.- Type Parameters:
I
- type ofDataObject
held in the ancestor's last step- Parameters:
type
- type class- Returns:
- ancestor
DataObjectIdentifier
- Throws:
ClassCastException
- iftype
does not represent aDataObject
classNullPointerException
- iftype
isnull
NoSuchElementException
- if this identifier does not have an ancestor of specified type- Since:
- 14.0.15
-
tryTrimTo
Returns this identifier's topmost (closest to the root) ancestor of specified type.- Type Parameters:
I
- type ofDataObject
held in the ancestor's last step- Parameters:
type
- type class- Returns:
- ancestor
DataObjectIdentifier
, ornull
ifsteps()
does not contain a step of specified type. - Throws:
ClassCastException
- iftype
does not represent aDataObject
classNullPointerException
- iftype
isnull
- Since:
- 14.0.15
-