Interface EnumValue


public interface EnumValue
EnumValue
Example to create an instance using the builder pattern

     EnumValue enumValue = EnumValue.builder()
             .key("{key}")
             .label("{label}")
             .build()
 
  • Method Details

    • getKey

      @NotNull @NotNull String getKey()

      Key of the value used as a programmatic identifier.

      Returns:
      key
    • getLabel

      @NotNull @NotNull String getLabel()

      Descriptive label of the value.

      Returns:
      label
    • setKey

      void setKey(String key)

      Key of the value used as a programmatic identifier.

      Parameters:
      key - value to be set
    • setLabel

      void setLabel(String label)

      Descriptive label of the value.

      Parameters:
      label - value to be set
    • of

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

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

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

      static EnumValueBuilder builder()
      builder factory method for EnumValue
      Returns:
      builder
    • builder

      static EnumValueBuilder builder(EnumValue template)
      create builder for EnumValue instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withEnumValue

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