Class SingleEntryMap
java.lang.Object
net.sf.saxon.ma.map.SingleEntryMap
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddEntry(AtomicValue key, GroundedValue value) Create a new map containing the existing entries in the map plus an additional entry, without modifying the original.booleanconforms(AtomicType keyType, SequenceType valueType, TypeHierarchy th) Ask whether the map conforms to a given map typeget(AtomicValue key) Get an entry from the MapGet the type of the map.Get the lowest common item type of the keys in the mapbooleanisEmpty()Ask whether the map is emptykeys()Get the set of all key values in the map.Get the set of all key-value pairs in the mapremove(AtomicValue key) Remove an entry from the mapintsize()Get the size of the mapMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GroundedValue
asIterable, concatenate, containsNode, materializeMethods inherited from interface Item
getLength, head, isStreamed, iterate, reduce, subsequenceMethods inherited from interface MapItem
atomize, call, deepEquals, effectiveBooleanValue, export, getAnnotations, getArity, getDescription, getFunctionItemType, getFunctionName, getGenre, getOperandRoles, getStringValue, getStringValueCS, getTypedValue, isArray, isMap, isTrustedResultType, itemAt, makeNewContext, toShortStringMethods inherited from interface Sequence
makeRepeatable
-
Field Details
-
key
-
value
-
-
Constructor Details
-
SingleEntryMap
-
-
Method Details
-
get
Get an entry from the Map -
size
-
isEmpty
-
keys
Get the set of all key values in the map. -
keyValuePairs
Get the set of all key-value pairs in the map- Specified by:
keyValuePairsin interfaceMapItem- Returns:
- an iterable containing all the key-value pairs
-
addEntry
Create a new map containing the existing entries in the map plus an additional entry, without modifying the original. If there is already an entry with the specified key, this entry is replaced by the new entry. -
remove
Remove an entry from the map -
conforms
Ask whether the map conforms to a given map type -
getItemType
Get the type of the map. This method is used largely for diagnostics, to report the type of a map when it differs from the required type.- Specified by:
getItemTypein interfaceMapItem- Parameters:
th- the type hierarchy cache- Returns:
- the type of this map
-
getKeyUType
Get the lowest common item type of the keys in the map- Specified by:
getKeyUTypein interfaceMapItem- Returns:
- the most specific type to which all the keys belong. If the map is empty, return UType.VOID
-