Interface EnumSetAttribute

All Superinterfaces:
Attribute

public interface EnumSetAttribute 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

     EnumSetAttribute enumSetAttribute = EnumSetAttribute.builder()
             .plusValue(valueBuilder -> valueBuilder)
             .build()
 
  • Field Details

  • Method Details

    • getValue

      @NotNull @NotNull List<String> getValue()

      A set of enum values, each represented by its key. Each key must match the key of an AttributePlainEnumValue in the Product Type.

      Returns:
      value
    • setValue

      void setValue(String... value)

      A set of enum values, each represented by its key. Each key must match the key of an AttributePlainEnumValue in the Product Type.

      Parameters:
      value - values to be set
    • setValue

      void setValue(List<String> value)

      A set of enum values, each represented by its key. Each key must match the key of an AttributePlainEnumValue in the Product Type.

      Parameters:
      value - values to be set
    • of

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

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

      EnumSetAttribute copyDeep()
      Specified by:
      copyDeep in interface Attribute
    • deepCopy

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

      static EnumSetAttributeBuilder builder()
      builder factory method for EnumSetAttribute
      Returns:
      builder
    • builder

      static EnumSetAttributeBuilder builder(EnumSetAttribute template)
      create builder for EnumSetAttribute instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withEnumSetAttribute

      default <T> T withEnumSetAttribute(Function<EnumSetAttribute,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<EnumSetAttribute> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference