Module dev.metaschema.core
Interface ITimeWithTimeZoneItem
- All Superinterfaces:
IAnyAtomicItem,IAtomicValuedItem,ICollectionValue,IItem,ITemporalItem,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 Summary
Modifier and TypeMethodDescriptionstatic ITimeWithTimeZoneItemcast(IAnyAtomicItem item) Cast the provided type to this item type.default ITimeWithTimeZoneItemcastAsType(IAnyAtomicItem item) Cast the provideditemto be the same type as this item.default IAtomicOrUnionType<ITimeWithTimeZoneItem>getType()Get the type information for the item.type()Get the type information for this item.static ITimeWithTimeZoneItemConstruct a new time item using the provided stringvalue.static ITimeWithTimeZoneItemvalueOf(OffsetTime value) Construct a new time item using the providedvalue.static ITimeWithTimeZoneItemvalueOf(ZonedDateTime value) Construct a new time item using the providedvalue.Methods inherited from interface dev.metaschema.core.metapath.item.atomic.IAnyAtomicItem
accept, asMapKey, asString, asStringItem, atomize, deepEquals, getJavaTypeAdapter, getValue, toAtomicItemMethods inherited from interface dev.metaschema.core.metapath.item.ICollectionValue
deepEquals, toSignatureMethods inherited from interface dev.metaschema.core.metapath.item.IItem
contentsAsSequence, flatten, hasValue, toSequenceMethods inherited from interface dev.metaschema.core.metapath.item.atomic.ITemporalItem
getOffsetMethods inherited from interface dev.metaschema.core.metapath.item.atomic.ITimeItem
asLocalTime, asOffsetTime, getDay, getHour, getMinute, getMonth, getNano, getSecond, getYear, getZoneOffset, hasDate, hasTime, hasTimezone, replaceTimezone
-
Method Details
-
type
Get the type information for this item.- Returns:
- the type information
-
getType
Description copied from interface:IItemGet the type information for the item. -
valueOf
Construct a new time item using the provided stringvalue.- Parameters:
value- a string representing a time- Returns:
- the new item
-
valueOf
Construct a new time item using the providedvalue.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
Construct a new time item using the providedvalue.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
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 provideditemcannot be cast to this type
-
castAsType
Description copied from interface:IAnyAtomicItemCast the provideditemto be the same type as this item.- Specified by:
castAsTypein interfaceIAnyAtomicItem- Specified by:
castAsTypein interfaceITimeItem- Parameters:
item- the item to cast- Returns:
- an atomic item of this type
-