Class DiscriminatedUnionMember<D,V>
- java.lang.Object
-
- de.xima.fc.workflow.processor.value.DiscriminatedUnionMember<D,V>
-
- Type Parameters:
D
- Type of the discriminator that identifies the type of this member.V
- Type of the member's value.
- All Implemented Interfaces:
IDiscriminatedUnionMember<D,V>
public final class DiscriminatedUnionMember<D,V> extends Object implements IDiscriminatedUnionMember<D,V>
Default POJO implementation of aIDiscriminatedUnionMember
.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
D
getDiscriminator()
V
getValue()
int
hashCode()
static <D,V>
IDiscriminatedUnionMember<D,V>of(D discriminator, V value)
String
toString()
-
-
-
Method Detail
-
getDiscriminator
public D getDiscriminator()
- Specified by:
getDiscriminator
in interfaceIDiscriminatedUnionMember<D,V>
- Returns:
- The discriminator that identifies the type of this member.
-
getValue
public V getValue()
- Specified by:
getValue
in interfaceIDiscriminatedUnionMember<D,V>
- Returns:
- The value of this member.
-
of
public static <D,V> IDiscriminatedUnionMember<D,V> of(D discriminator, V value)
- Type Parameters:
D
- Type of the discriminator.V
- Type of the value.- Parameters:
discriminator
- Discriminator that discriminates the union member.value
- Value of the union member.- Returns:
- A new member of a discriminated union with the given discriminator and value.
-
-