public class DictionaryMap extends java.lang.Object implements MapItem
| Constructor and Description |
|---|
DictionaryMap()
Create an empty dictionary, to which entries can be added using
initialPut(String, GroundedValue),
provided this is done before the map is exposed to the outside world. |
| Modifier and Type | Method and Description |
|---|---|
MapItem |
addEntry(AtomicValue key,
GroundedValue value)
Create a new map containing the existing entries in the map plus an additional entry,
without modifying the original.
|
boolean |
conforms(AtomicType keyType,
SequenceType valueType,
TypeHierarchy th)
Ask whether the map conforms to a given map type
|
GroundedValue |
get(AtomicValue key)
Get an entry from the Map
|
ItemType |
getItemType(TypeHierarchy th)
Get the type of the map.
|
UType |
getKeyUType()
Get the lowest common item type of the keys in the map
|
void |
initialAppend(java.lang.String key,
GroundedValue value)
During initial construction of the map, append a value to a possibly existing key-value pair
|
void |
initialPut(java.lang.String key,
GroundedValue value)
During initial construction of the map, add a key-value pair
|
boolean |
isEmpty()
Ask whether the map is empty
|
AtomicIterator<StringValue> |
keys()
Get the set of all key values in the map.
|
java.lang.Iterable<KeyValuePair> |
keyValuePairs()
Get the set of all key-value pairs in the map
|
MapItem |
remove(AtomicValue key)
Remove an entry from the map
|
int |
size()
Get the size of the map
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitatomize, call, deepEquals, effectiveBooleanValue, export, getAnnotations, getArity, getDescription, getFunctionItemType, getFunctionName, getGenre, getItemTypeOfSequence, getOperandRoles, getStringValue, getStringValueCS, getTypedValue, isArray, isKnownToConform, isMap, isTrustedResultType, itemAt, makeNewContext, mapToString, toShortStringargumentArraygetLength, head, isStreamed, iterate, reduce, subsequence, toGroundedValueasIterable, concatenate, containsNode, materializemakeRepeatablepublic DictionaryMap()
initialPut(String, GroundedValue),
provided this is done before the map is exposed to the outside world.public void initialPut(java.lang.String key,
GroundedValue value)
public void initialAppend(java.lang.String key,
GroundedValue value)
public GroundedValue get(AtomicValue key)
public int size()
public boolean isEmpty()
public AtomicIterator<StringValue> keys()
public java.lang.Iterable<KeyValuePair> keyValuePairs()
keyValuePairs in interface MapItempublic MapItem addEntry(AtomicValue key, GroundedValue value)
public MapItem remove(AtomicValue key)
public boolean conforms(AtomicType keyType, SequenceType valueType, TypeHierarchy th)
public ItemType getItemType(TypeHierarchy th)
getItemType in interface MapItemth - the type hierarchy cachepublic UType getKeyUType()
getKeyUType in interface MapItemCopyright (c) 2004-2021 Saxonica Limited. All rights reserved.