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 Default Methods Modifier and Type Method Description default IUnionValueDescriptorBuilder<D>
add(D discriminator, IValueDescriptor<?,?> descriptor)
Adds a discriminated union member to the list of a members of the union.IUnionValueDescriptorBuilder<D>
add(D discriminator, IValueDescriptorCreator creator)
Adds a discriminated union member to the list of a members of the union.default IUnionValueDescriptorBuilder<D>
addAndUseAsDefault(D discriminator, IValueDescriptor<?,?> descriptor)
Adds a discriminated union member to the list of a members of the union.IUnionValueDescriptorBuilder<D>
addAndUseAsDefault(D discriminator, IValueDescriptorCreator creator)
Adds a discriminated union member to the list of a members of the union.IUnionValueDescriptorBuilder<D>
description(String description)
-
-
-
Method Detail
-
add
default IUnionValueDescriptorBuilder<D> add(D discriminator, IValueDescriptor<?,?> descriptor)
Adds a discriminated union member to the list of a members of the union.- 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
IUnionValueDescriptorBuilder<D> add(D discriminator, IValueDescriptorCreator creator)
Adds a discriminated union member to the list of a members of the union.- 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
default IUnionValueDescriptorBuilder<D> addAndUseAsDefault(D discriminator, IValueDescriptor<?,?> 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.- 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
IUnionValueDescriptorBuilder<D> addAndUseAsDefault(D discriminator, IValueDescriptorCreator 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.- 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.
-
-