Interface ITimeWithTimeZoneItem

All Superinterfaces:
IAnyAtomicItem, IAtomicValuedItem, ICollectionValue, IItem, ITemporalItem, ITimeItem

public interface ITimeWithTimeZoneItem extends ITimeItem
An atomic Metapath item representing a time value in the Metapath system with an explicit time zone.

This interface provides functionality for handling time values with time zone information, supporting parsing, casting, and comparison operations. It works in conjunction with ZonedDateTime to eliminate time zone ambiguity.

  • Method Details

    • type

      @NonNull static IAtomicOrUnionType<ITimeWithTimeZoneItem> type()
      Get the type information for this item.
      Returns:
      the type information
    • getType

      Description copied from interface: IItem
      Get the type information for the item.
      Specified by:
      getType in interface IItem
      Specified by:
      getType in interface ITimeItem
      Returns:
      the item's type information
    • valueOf

      @NonNull static ITimeWithTimeZoneItem valueOf(@NonNull String value)
      Construct a new time item using the provided string value.
      Parameters:
      value - a string representing a time
      Returns:
      the new item
    • valueOf

      @NonNull static ITimeWithTimeZoneItem valueOf(@NonNull ZonedDateTime value)
      Construct a new time item using the provided value.

      This method handles dates with explicit timezone information using ZonedDateTime. The timezone is preserved as specified in the input and is significant for time operations and comparisons.

      Parameters:
      value - a time, with time zone information
      Returns:
      the new item
    • valueOf

      @NonNull static ITimeWithTimeZoneItem valueOf(@NonNull OffsetTime value)
      Construct a new time item using the provided value.

      This method handles dates with explicit timezone information using ZonedDateTime. The timezone is preserved as specified in the input and is significant for time operations and comparisons.

      Parameters:
      value - a time, with time zone information
      Returns:
      the new item
    • cast

      @NonNull static ITimeWithTimeZoneItem cast(@NonNull IAnyAtomicItem item)
      Cast the provided type to this item type.
      Parameters:
      item - the item to cast
      Returns:
      the original item if it is already this type, otherwise a new item cast to this type
      Throws:
      InvalidValueForCastFunctionException - if the provided item cannot be cast to this type
    • castAsType

      default ITimeWithTimeZoneItem castAsType(IAnyAtomicItem item)
      Description copied from interface: IAnyAtomicItem
      Cast the provided item to be the same type as this item.
      Specified by:
      castAsType in interface IAnyAtomicItem
      Specified by:
      castAsType in interface ITimeItem
      Parameters:
      item - the item to cast
      Returns:
      an atomic item of this type