Interface DateTimeAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
DateTimeAttributeImpl

public interface DateTimeAttribute extends Attribute

This type represents an attribute whose value is a date with time.


Example to create an instance using the builder pattern

     DateTimeAttribute dateTimeAttribute = DateTimeAttribute.builder()
             .value(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .build()
 
  • Field Details

  • Method Details

    • getValue

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

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

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

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

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

      static DateTimeAttributeBuilder builder()
      builder factory method for DateTimeAttribute
      Returns:
      builder
    • builder

      static DateTimeAttributeBuilder builder(DateTimeAttribute template)
      create builder for DateTimeAttribute instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withDateTimeAttribute

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