java.lang.Object
de.fraunhofer.iosb.ilt.frostclient.models.ext.TimeValue
All Implemented Interfaces:
ComplexValue<TimeValue>, TimeObject

public class TimeValue extends Object implements TimeObject, ComplexValue<TimeValue>
Common interface for time values. Needed as STA sometimes does not specify wether an instant or an interval will be passed.
  • Field Details

  • Constructor Details

    • TimeValue

      public TimeValue()
    • TimeValue

      public TimeValue(TimeInstant timeInstant)
    • TimeValue

      public TimeValue(TimeInterval timeInterval)
  • Method Details

    • create

      public static TimeValue create(TimeInstant instant)
    • create

      public static TimeValue create(TimeInterval timeInterval)
    • create

      public static TimeValue create(net.time4j.Moment start, net.time4j.Moment end)
    • create

      public static TimeValue create(Instant start, Instant end)
    • create

      public static TimeValue create(ZonedDateTime start, ZonedDateTime end)
    • create

      public static TimeValue create(net.time4j.Moment instant)
    • create

      public static TimeValue create(Instant instant)
    • create

      public static TimeValue create(ZonedDateTime zdt)
    • isInstant

      public boolean isInstant()
    • getInstant

      public TimeInstant getInstant()
    • isInterval

      public boolean isInterval()
    • getInterval

      public TimeInterval getInterval()
    • asISO8601

      public String asISO8601()
      Specified by:
      asISO8601 in interface TimeObject
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface TimeObject
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getProperty

      public <P> P getProperty(Property<P> property)
      Description copied from interface: ComplexValue
      Get the value of the given property.
      Specified by:
      getProperty in interface ComplexValue<TimeValue>
      Type Parameters:
      P - The type of the property and value.
      Parameters:
      property - The property to get the value of.
      Returns:
      the value of the requested property.
    • setProperty

      public <P> TimeValue setProperty(Property<P> property, P value)
      Description copied from interface: ComplexValue
      Set the given property to the given value.
      Specified by:
      setProperty in interface ComplexValue<TimeValue>
      Type Parameters:
      P - The type of the property.
      Parameters:
      property - The property to set.
      value - The value to set the property to.
      Returns:
      this.
    • getProperty

      public Object getProperty(String name)
      Description copied from interface: ComplexValue
      Get the custom property with the given name. Only valid for ComplexTypes that are classed as openType, returns null for non-openTypes.
      Specified by:
      getProperty in interface ComplexValue<TimeValue>
      Parameters:
      name - The name of the custom property to fetch.
      Returns:
      The value of the custom property.
    • setProperty

      public TimeValue setProperty(String name, Object value)
      Description copied from interface: ComplexValue
      Set the custom property with the given name to the given value. Only valid for ComplexTypes that are classed as openType.
      Specified by:
      setProperty in interface ComplexValue<TimeValue>
      Parameters:
      name - The name of the custom property to set.
      value - The value of the custom property to set.
      Returns:
      this.