public class RangeKey extends MapItem
At present range keys are only available for string-valued keys using the Unicode codepoint collating sequence.
| Constructor and Description |
|---|
RangeKey(UnicodeString min,
UnicodeString max,
java.util.TreeMap<AtomicMatchKey,java.lang.Object> index) |
| 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
|
boolean |
deepEquals(Function other,
XPathContext context,
AtomicComparer comparer,
int flags)
Test whether this FunctionItem is deep-equal to another function item,
under the rules of the deep-equal function
|
void |
export(ExpressionPresenter out)
Output information about this function item to the diagnostic explain() output
|
GroundedValue |
get(AtomicValue key)
Get an entry from the Map
|
java.lang.String |
getDescription()
Get a description of this function for use in error messages.
|
MapType |
getFunctionItemType()
Get the item type of the function item
|
MapType |
getItemType(TypeHierarchy th)
Get the type of the map.
|
UType |
getKeyUType()
Get the lowest common item type of the keys in the map
|
boolean |
isEmpty()
Ask whether the map is empty
|
boolean |
isTrustedResultType()
Ask if the function can be trusted to return a result of the correct type
|
AtomicIterator |
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
|
java.lang.String |
toString() |
atomize, call, effectiveBooleanValue, getAnnotations, getArity, getFunctionName, getGenre, getItemTypeOfSequence, getOperandRoles, getTypedValue, getUnicodeStringValue, isArray, isKnownToConform, isMap, itemAt, makeNewContext, mapToString, toShortStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisSequenceVariadicgetLength, getStringValue, head, isStreamed, iterate, reduce, subsequenceasIterable, concatenate, containsNode, materializemakeRepeatablepublic RangeKey(UnicodeString min, UnicodeString max, java.util.TreeMap<AtomicMatchKey,java.lang.Object> index)
public GroundedValue get(AtomicValue key)
public int size()
public boolean isEmpty()
public AtomicIterator keys()
public java.lang.Iterable<KeyValuePair> keyValuePairs()
keyValuePairs in class MapItempublic MapItem remove(AtomicValue key)
public UType getKeyUType()
getKeyUType in class MapItempublic MapItem addEntry(AtomicValue key, GroundedValue value)
public boolean conforms(AtomicType keyType, SequenceType valueType, TypeHierarchy th)
public MapType getItemType(TypeHierarchy th)
getItemType in class MapItemth - the type hierarchy (not used)public MapType getFunctionItemType()
getFunctionItemType in interface FunctiongetFunctionItemType in class MapItempublic java.lang.String getDescription()
getDescription in interface FunctiongetDescription in class MapItempublic boolean deepEquals(Function other, XPathContext context, AtomicComparer comparer, int flags)
deepEquals in interface FunctiondeepEquals in class MapItemother - the other function itemcontext - the dynamic evaluation contextcomparer - the object to perform the comparisonflags - options for how the comparison is performedpublic void export(ExpressionPresenter out) throws XPathException
export in interface Functionexport in class MapItemout - the destination for the informationXPathException - if things go wrongpublic boolean isTrustedResultType()
FunctionisTrustedResultType in interface FunctionisTrustedResultType in class MapItempublic java.lang.String toString()
toString in class java.lang.ObjectCopyright (c) 2004-2022 Saxonica Limited. All rights reserved.