Interface IUnionValueBuilder<D>
-
- Type Parameters:
D
- Type of the union discriminator.
- All Superinterfaces:
org.apache.commons.lang3.builder.Builder<Object>
,ISubTypeValueBuilder<Object,IUnionValueBuilder<D>>
,IValueBuilder<Object>
,IValueConfigurator
public interface IUnionValueBuilder<D> extends ISubTypeValueBuilder<Object,IUnionValueBuilder<D>>
AIValueBuilder
for creating a union value.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default IUnionValueBuilder<D>
asThis()
IDiscriminatedUnionMember<D,?>
buildDiscriminatedMember()
Class<D>
getDiscriminatorClass()
default IUnionValueBuilder<D>
value(IDiscriminatedUnionMember<D,?> value)
Sets the value of the union to the given member.IUnionValueBuilder<D>
value(D discriminator, IValueCreator creator)
Sets the value of the union at the given member discriminator to the given value.default IUnionValueBuilder<D>
value(D discriminator, Class<?> memberClass, IValueCreator creator)
Deprecated.Usevalue(Object, IValueCreator)
, possibly in combination withIValueBuilder.whenString(Consumer)
etc.default IUnionValueBuilder<D>
value(D discriminator, Object value)
Sets the value of the union at the given member discriminator to the given value.-
Methods inherited from interface de.xima.fc.interfaces.workflow.value.ISubTypeValueBuilder
value, whenBoolean, whenConst, whenFloat, whenInteger, whenList, whenMap, whenNull, whenRecord, whenString, whenTuple, whenUnion, whenVoid
-
-
-
-
Method Detail
-
asThis
default IUnionValueBuilder<D> asThis()
- Specified by:
asThis
in interfaceISubTypeValueBuilder<Object,IUnionValueBuilder<D>>
- Returns:
- This instance.
-
buildDiscriminatedMember
IDiscriminatedUnionMember<D,?> buildDiscriminatedMember()
- Returns:
- The discriminated union member representing the current value of this union builder.
null
when the union value descriptor does not define any members.
-
getDiscriminatorClass
Class<D> getDiscriminatorClass()
- Returns:
- The type of the discriminating value.
- Since:
- 8.1.0
-
value
@Deprecated default IUnionValueBuilder<D> value(D discriminator, Class<?> memberClass, IValueCreator creator)
Deprecated.Usevalue(Object, IValueCreator)
, possibly in combination withIValueBuilder.whenString(Consumer)
etc.Sets the value of the union at the given member discriminator to the given value.- Parameters:
discriminator
- Discriminator for the union member.memberClass
- class of the union member value.creator
- Value creator the value of the union member value.- Returns:
- This value builder for chaining method calls.
-
value
IUnionValueBuilder<D> value(D discriminator, IValueCreator creator)
Sets the value of the union at the given member discriminator to the given value.- Parameters:
discriminator
- Discriminator for the union member.creator
- Value creator the value of the union member value.- Returns:
- This value builder for chaining method calls.
-
value
default IUnionValueBuilder<D> value(D discriminator, Object value)
Sets the value of the union at the given member discriminator to the given value.- Parameters:
discriminator
- Discriminator for the union member.value
- The value of the union member value.- Returns:
- This value builder for chaining method calls.
-
value
default IUnionValueBuilder<D> value(IDiscriminatedUnionMember<D,?> value)
Sets the value of the union to the given member.- Parameters:
value
- The union member value to set.- Returns:
- This value builder for chaining method calls.
-
-