Package net.sf.saxon.ma.map
Class EmptyMap
java.lang.Object
net.sf.saxon.ma.MapOrArray
net.sf.saxon.ma.map.MapItem
net.sf.saxon.ma.map.EmptyMap
- All Implemented Interfaces:
Callable,FunctionItem,GroundedValue,Item,Sequence
A map with no entries.
There are two empty maps, a 3.1 version and a 4.0 version. This is because maps constructed by adding entries inherit the version of the original. The difference is that in a 3.1 map, hexBinary and base64Binary values are always distinct, whereas in a 4.0 map, they may be duplicates.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.sf.saxon.ma.map.MapItem
MapItem.KeyIterator -
Field Summary
FieldsFields inherited from class net.sf.saxon.ma.map.MapItem
mapConstructorDuplicatesAction, xslMapDuplicatesAction, xslRecordDuplicatesAction -
Method Summary
Modifier and TypeMethodDescriptionbooleanconforms(PlainType keyType, SequenceType valueType) Ask whether the map conforms to a given map typeget(AtomicValue key) Get an entry from the Mapstatic EmptyMapgetInstance(int version) Get the type of the map.booleanisEmpty()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 mapput(AtomicValue key, GroundedValue value) Create a new map containing the existing entries in the map plus an additional entry, without modifying the original.remove(AtomicValue key) Remove an entry from the mapintsize()Get the size of the maptoString()Methods inherited from class net.sf.saxon.ma.map.MapItem
atomize, call, deepEqual40, deepEquals, effectiveBooleanValue, entries, export, followingKeyValuePairs, getAnnotations, getArity, getDescription, getFunctionItemType, getFunctionName, getGenre, getItemTypeOfSequence, getOperandRoles, getSpecVersion, getTypedValue, getU, getUnicodeStringValue, getWithPlan, isArray, isKnownToConform, isMap, isTrustedResultType, itemAt, makeNewContext, mapToString, precedingKeyValuePairs, setSpecVersion, toShortStringMethods inherited from class net.sf.saxon.ma.MapOrArray
obtainRootJNodeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.sf.saxon.om.FunctionItem
isSequenceVariadicMethods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, concatenate, containsNode, materializeMethods inherited from interface net.sf.saxon.om.Item
getLabel, getLength, getStringValue, head, isStreamed, iterate, reduce, subsequenceMethods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
Field Details
-
INSTANCE_31
-
INSTANCE_40
-
-
Method Details
-
getInstance
-
get
Get an entry from the Map -
size
public int size()Get the size of the map -
isEmpty
public boolean isEmpty()Ask whether the map is empty -
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 classMapItem- Returns:
- an iterable containing all the key-value pairs
-
put
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.- Overrides:
getItemTypein classMapItem- Parameters:
th- the type hierarchy cache- Returns:
- the type of this map
-
toString
-