Interface AttributeSetType

All Superinterfaces:
AttributeType

public interface AttributeSetType extends AttributeType

AttributeType that defines a set (without duplicate elements) with values of the given elementType. It does not support isRequired. Since this type itself is an AttributeType, it is possible to construct an AttributeSetType of an AttributeSetType of any AttributeType, and to continue with this iteration until terminating with any non-AttributeSetType. In case the AttributeSetType iteration terminates with an AttributeNestedType, the iteration can have 5 steps at maximum.


Example to create an instance using the builder pattern

     AttributeSetType attributeSetType = AttributeSetType.builder()
             .elementType(elementTypeBuilder -> elementTypeBuilder)
             .build()
 
  • Field Details

  • Method Details

    • getElementType

      @NotNull @Valid @NotNull @Valid AttributeType getElementType()

      Attribute type of the elements in the set.

      Returns:
      elementType
    • setElementType

      void setElementType(AttributeType elementType)

      Attribute type of the elements in the set.

      Parameters:
      elementType - value to be set
    • of

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

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

      factory method to create a deep copy of AttributeSetType
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static AttributeSetTypeBuilder builder()
      builder factory method for AttributeSetType
      Returns:
      builder
    • builder

      static AttributeSetTypeBuilder builder(AttributeSetType template)
      create builder for AttributeSetType instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withAttributeSetType

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