Interface IUnionValueDescriptorBuilder<D>
-
- Type Parameters:
D
- Type of the union discriminator.
- All Superinterfaces:
org.apache.commons.lang3.builder.Builder<IUnionValueDescriptor<D>>
,IValueDescriptorBuilder<Object,IUnionValueBuilder<D>,IUnionValueDescriptor<D>>
public interface IUnionValueDescriptorBuilder<D> extends IValueDescriptorBuilder<Object,IUnionValueBuilder<D>,IUnionValueDescriptor<D>>
AIValueDescriptorBuilder
for creating a union value descriptor. UseIValueDescriptorFactory.unionBuilder(Class)
to create a builder.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> IUnionValueDescriptorBuilder<D>
add(D discriminator, IValueDescriptor<T,? extends IValueBuilder<T>> descriptor)
Adds a discriminated union member to the list of a members of the union.<T> IUnionValueDescriptorBuilder<D>
add(D discriminator, IValueDescriptorCreator<T> creator)
Adds a discriminated union member to the list of a members of the union.<T> IUnionValueDescriptorBuilder<D>
addAndUseAsDefault(D discriminator, IValueDescriptor<T,? extends IValueBuilder<T>> descriptor)
Adds a discriminated union member to the list of a members of the union.<T> IUnionValueDescriptorBuilder<D>
addAndUseAsDefault(D discriminator, IValueDescriptorCreator<T> creator)
Adds a discriminated union member to the list of a members of the union.IUnionValueDescriptorBuilder<D>
description(String description)
-
-
-
Method Detail
-
add
<T> IUnionValueDescriptorBuilder<D> add(D discriminator, IValueDescriptor<T,? extends IValueBuilder<T>> descriptor)
Adds a discriminated union member to the list of a members of the union.- Type Parameters:
T
- Type of the union member value.- Parameters:
discriminator
- A union member discriminator to add.descriptor
- Value descriptor for the value at the given discriminator.- Returns:
- This value descriptor builder for chaining method calls.
-
add
<T> IUnionValueDescriptorBuilder<D> add(D discriminator, IValueDescriptorCreator<T> creator)
Adds a discriminated union member to the list of a members of the union.- Type Parameters:
T
- Type of the union member value.- Parameters:
discriminator
- A union member discriminator to add.creator
- Value creator for the value descriptor for the value at the given discriminator.- Returns:
- This value descriptor builder for chaining method calls.
-
addAndUseAsDefault
<T> IUnionValueDescriptorBuilder<D> addAndUseAsDefault(D discriminator, IValueDescriptor<T,? extends IValueBuilder<T>> descriptor)
Adds a discriminated union member to the list of a members of the union. Uses the member as the default value when no explicit value is provided.- Type Parameters:
T
- Type of the union member value.- Parameters:
discriminator
- A union member discriminator to add.descriptor
- Value descriptor for the value at the given discriminator.- Returns:
- This value descriptor builder for chaining method calls.
-
addAndUseAsDefault
<T> IUnionValueDescriptorBuilder<D> addAndUseAsDefault(D discriminator, IValueDescriptorCreator<T> creator)
Adds a discriminated union member to the list of a members of the union. Uses the member as the default value when no explicit value is provided.- Type Parameters:
T
- Type of the union member value.- Parameters:
discriminator
- A union member discriminator to add.creator
- Value creator for the value descriptor for the value at the given discriminator.- Returns:
- This value descriptor builder for chaining method calls.
-
description
IUnionValueDescriptorBuilder<D> description(String description)
- Specified by:
description
in interfaceIValueDescriptorBuilder<Object,IUnionValueBuilder<D>,IUnionValueDescriptor<D>>
- Parameters:
description
- The description for the value. May be either a localized message or an I18N key.- Returns:
- This builder instance for chaining method calls.
-
-