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 a IDiscriminatedUnionMember.
Since:
7.0.0
Author:
XIMA MEDIA GmbH
  • Method Details

    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getDiscriminator

      public D getDiscriminator()
      Specified by:
      getDiscriminator in interface IDiscriminatedUnionMember<D,V>
      Returns:
      The discriminator that identifies the type of this member.
    • getValue

      public V getValue()
      Specified by:
      getValue in interface IDiscriminatedUnionMember<D,V>
      Returns:
      The value of this member.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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.