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

     Attributes attributes = Attributes.builder()
             .build()
 
  • Method Details

    • values

      @NotNull @NotNull Map<String,Attribute> values()

      The name of the attribute is given by the key and shouldn't be set on the attribute itself. And since this property will be represented as a map, we can set individual attributes to null to delete them (which follows JSON Merge Patch semantics).

      Returns:
      map of the pattern property values
    • setValue

      void setValue(String key, Attribute value)

      The name of the attribute is given by the key and shouldn't be set on the attribute itself. And since this property will be represented as a map, we can set individual attributes to null to delete them (which follows JSON Merge Patch semantics).

      Parameters:
      key - property name
      value - property value
    • of

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

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

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

      static AttributesBuilder builder()
      builder factory method for Attributes
      Returns:
      builder
    • builder

      static AttributesBuilder builder(Attributes template)
      create builder for Attributes instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withAttributes

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