Interface DataObjectReference.Builder<T extends DataObject>
- Type Parameters:
T
- type ofDataObject
held in the last step.
- All Known Subinterfaces:
DataObjectIdentifier.Builder<T>
,DataObjectIdentifier.Builder.WithKey<T,
,K> DataObjectReference.Builder.WithKey<T,
K>
- All Known Implementing Classes:
AbstractDataObjectIdentifierBuilder
,AbstractDataObjectReferenceBuilder
,DataObjectIdentifierBuilder
,DataObjectIdentifierBuilderWithKey
,DataObjectReferenceBuilder
,DataObjectReferenceBuilderWithKey
,InstanceIdentifier.Builder
,InstanceIdentifier.KeyedBuilder
- Enclosing interface:
DataObjectReference<T extends DataObject>
public static sealed interface DataObjectReference.Builder<T extends DataObject>
permits DataObjectReference.Builder.WithKey<T,K>, DataObjectIdentifier.Builder<T>, AbstractDataObjectReferenceBuilder<T>
A builder of
DataObjectReference
objects.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
DataObjectReference.Builder.WithKey<T extends EntryObject<T,
K>, K extends Key<T>> A builder ofDataObjectReference.WithKey
objects. -
Method Summary
Modifier and TypeMethodDescription<A extends Augmentation<? super T>>
@NonNull DataObjectReference.Builder<A> augmentation
(@NonNull Class<A> augmentation) Update this builder to build a reference to a specific augmentation of the data object this builder currently points to.@NonNull DataObjectReference
<T> build()
Build the data object reference.<N extends EntryObject<N,
K> & ChildOf<? super T>, K extends Key<N>>
@NonNull DataObjectReference.Builder.WithKey<N, K> Append the specified listItem as a child of the data object this build currently references.<C extends ChoiceIn<? super T> & DataObject,
K extends Key<N>, N extends EntryObject<N, K> & ChildOf<? super C>>
@NonNull DataObjectReference.Builder.WithKey<N, K> Append the specified listItem as a child of the data object this build currently references.<N extends ChildOf<? super T>>
@NonNull DataObjectReference.Builder<N> Append the specified container as a child of the data object this build currently references.<C extends ChoiceIn<? super T> & DataObject,
N extends ChildOf<? super C>>
@NonNull DataObjectReference.Builder<N> Append the specified container as a child of the data object this build currently references.
-
Method Details
-
augmentation
<A extends Augmentation<? super T>> @NonNull DataObjectReference.Builder<A> augmentation(@NonNull Class<A> augmentation) Update this builder to build a reference to a specific augmentation of the data object this builder currently points to.- Type Parameters:
A
- augmentation type- Parameters:
augmentation
- augmentation class- Returns:
- this builder
- Throws:
NullPointerException
- ifaugmentation
isnull
-
child
<N extends ChildOf<? super T>> @NonNull DataObjectReference.Builder<N> child(@NonNull Class<N> container) Append the specified container as a child of the data object this build currently references. This method should be used when you want to build an instance identifier by appending top-level elements.- Type Parameters:
N
- Container type- Parameters:
container
- Container to append- Returns:
- this builder
- Throws:
NullPointerException
- ifcontainer
is null
-
child
<C extends ChoiceIn<? super T> & DataObject,N extends ChildOf<? super C>> @NonNull DataObjectReference.Builder<N> child(Class<C> caze, @NonNull Class<N> container) Append the specified container as a child of the data object this build currently references. This method should be used when you want to build an reference by appending a container node to the identifier and thecontainer
is defined in agrouping
used in acase
statement.- Type Parameters:
C
- Case typeN
- Container type- Parameters:
caze
- Choice case classcontainer
- Container to append- Returns:
- this builder
- Throws:
NullPointerException
- ifcontainer
is null
-
child
<N extends EntryObject<N,K> & ChildOf<? super T>, @NonNull DataObjectReference.Builder.WithKey<N,K extends Key<N>> K> child(@NonNull Class<@NonNull N> listItem, @NonNull K listKey) Append the specified listItem as a child of the data object this build currently references. This method should be used when you want to build a reference by appending a specific list element to the identifier.- Type Parameters:
N
- List typeK
- Key type- Parameters:
listItem
- List to appendlistKey
- List key- Returns:
- this builder
- Throws:
NullPointerException
- if any argument is null
-
child
<C extends ChoiceIn<? super T> & DataObject,K extends Key<N>, @NonNull DataObjectReference.Builder.WithKey<N,N extends EntryObject<N, K> & ChildOf<? super C>> K> child(@NonNull Class<C> caze, @NonNull Class<N> listItem, @NonNull K listKey) Append the specified listItem as a child of the data object this build currently references. This method should be used when you want to build a reference by appending a specific list element to the identifier and thelist
is defined in agrouping
used in acase
statement.- Type Parameters:
C
- Case typeK
- Key typeN
- List type- Parameters:
caze
- Choice case classlistItem
- List to appendlistKey
- List key- Returns:
- this builder
- Throws:
NullPointerException
- if any argument is null
-
build
@NonNull DataObjectReference<T> build()Build the data object reference.- Returns:
- resulting
DataObjectReference
.
-