Interface EnumAttribute

All Superinterfaces:
Attribute

public interface EnumAttribute extends Attribute

This type represents an attribute whose value is an enum. The attribute value refers to the key of the enum value.


Example to create an instance using the builder pattern

     EnumAttribute enumAttribute = EnumAttribute.builder()
             .value("{value}")
             .build()
 
  • Field Details

  • Method Details

    • getValue

      @NotNull @NotNull String getValue()
      Returns:
      value
    • setValue

      void setValue(String value)
      set value
      Parameters:
      value - value to be set
    • of

      static EnumAttribute of()
      factory method
      Returns:
      instance of EnumAttribute
    • of

      static EnumAttribute of(EnumAttribute template)
      factory method to create a shallow copy EnumAttribute
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static EnumAttribute deepCopy(@Nullable EnumAttribute template)
      factory method to create a deep copy of EnumAttribute
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static EnumAttributeBuilder builder()
      builder factory method for EnumAttribute
      Returns:
      builder
    • builder

      static EnumAttributeBuilder builder(EnumAttribute template)
      create builder for EnumAttribute instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withEnumAttribute

      default <T> T withEnumAttribute(Function<EnumAttribute,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<EnumAttribute> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference