Package net.sf.saxon.ma.map


package net.sf.saxon.ma.map

This package implements maps, as introduced in XSLT 3.0 and XQuery 3.1: maps provide a dictionary-like data structure.

Maps are immutable, so that adding a new entry to a map creates a new map.

The entries in a map are (Key, Value) pairs. The key is always an atomic value; the value may be any XPath sequence.

There are functions (each supported by its own implementation class) to create a new map, to add an entry to a map, to get an entry from a map, and to list all the keys that are present in a map.

  • Class
    Description
    A general-purpose XDM map implementation that is ordered, that holds any kind of key, and that supports incremental modification only by copying the whole map to a different structure.
    A BigDecimalMapKey is the AtomicMatchKey used for any numeric value that is not (a) numerically equal to some 32-bit integer, or (b) one of the special values NaN, +INF, or -INF.
    A DeltaMap consists of a fixed part and a variable part.
     
    A map with no entries.
    A general-purpose XDM map implementation that is ordered, that holds any kind of key, and that supports incremental modification.
    A general-purpose XDM map implementation that is ordered, that holds any kind of key, and that supports incremental modification only by copying the whole map to a different structure.
    A variant of the FixedMap map implementation optimized for the case where the keys are all instances of xs:string.
    Builder class for constructing ordered maps.
    An Int32MapKey is the AtomicMatchKey used for all numeric values that are numerically equal to some 32-bit signed integer, regardless of the primitive type of the actual numeric value.
    A key and a corresponding value to be held in a Map.
    Marker interface representing a plan for evaluating a map lookup
    Function signatures (and pointers to implementations) of the functions defined in the map namespace in XPath 3.1 and 4.0
    Implementation of the proposed XPath 4.0 function map:build($sequence, $key, $value, $options) => map(*)
    Implementation of the XPath 3.1 function map:contains(Map, key) => boolean
    Implementation of the proposed 4.0 function map:empty(Map) => boolean
    Implementation of the proposed 4.0 function map:entries(Map) => map(*)*
    Implementation of the function map:entry(key, value) => Map
     
    Implementation of the proposed XPath 4.0 function map:filter(Map, function(*)) => Map
    Implementation of the XPath 3.1 function map:find(item()*, key) => array
    Implementation of the function map:for-each(Map, Function) => item()*
    Implementation of the XPath 3.1 function map:get(Map, key) => value
    Implementation of the proposed 4.0 function map:items(Map) => item()*
    Implementation of the XPath 3.1 function map:keys(Map) => atomicValue*
    Implementation of the function map:merge() => Map From 9.8, map:merge is also used to implement map constructors in XPath and the xsl:map instruction in XSLT.
    Implementation of the function map:put() => Map
    Implementation of the XPath 3.1 function map:remove(Map, key) => value
    Implementation of the extension function map:size(map) => integer
     
    Abstract superclass for different implementations of an XDM map item
     
    An instance of this class represents a specific map item type, for example map(x:integer, element(employee))
    Implementation of an internal function map:_untyped-contains(Map, key) => boolean, which is like map:contains except that if the supplied key is untyped atomic, it is converted to all the possible types present in the map and returns true if the key after conversion is present.
     
    This class implements an XPath map item as a view of an XSLT key index.
    An instance of this class represents a specific record item type, for example record(x as xs:double, y as element(employee)).
    Class representing one field definition within a record type definition, used only while constructing a record definition
     
     
    A Shape represents the common structure of a set of ShapedMap objects, each being a map with the same set of keys but different values.
    A ShapedMap is an implementation of XDM maps optimised for the case where many maps have the same set of string-valued keys.
     
    A map comprising a single key-value pair.
    A FlexibleShapedMap is an implementation of XDM maps optimised for the case where many maps have the same set of string-valued keys.
    Builder class for constructing ordered maps, where the keys are all known in advance to have a type annotation of xs:string (so we don't need to retain the type annotation).