Package dev.metaschema.core.metapath.item.function


package dev.metaschema.core.metapath.item.function
Provides support for Metapath function items, including arrays and maps.

This package implements the XPath 3.1 function item types, including arrays and maps. These are first-class values in Metapath that can be passed as arguments, returned from functions, and stored in sequences.

Array Items

Arrays are ordered collections of values, where each value is a sequence.

Arrays are immutable once created and support operations like getting members by position (1-indexed), determining size, and conversion to sequences. Factory methods are provided for creating arrays with various numbers of members.

Map Items

Maps are unordered collections of key-value pairs, where keys must be atomic items and values are sequences.

  • IMapItem - The main interface for map items, implementing Map
  • IMapKey - The key type used in maps, wrapping atomic items with proper equality semantics
  • IKeySpecifier - Interface for computing map keys from items

Maps are immutable once created and support operations like getting values by key, determining size, and merging maps. Factory methods are provided for creating maps with various numbers of entries.

Map Key Types

Different atomic types use different equality semantics for map keys:

Exceptions

See Also: