public class RangeKey extends java.lang.Object implements MapItem
At present range keys are only available for string-valued keys using the Unicode codepoint collating sequence.
| Constructor and Description |
|---|
RangeKey(java.lang.String min,
java.lang.String max,
java.util.TreeMap<AtomicMatchKey,java.util.List<NodeInfo>> 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()
Check that result type is of the trusted system functions 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() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitatomize, call, effectiveBooleanValue, getAnnotations, getArity, getFunctionName, getGenre, getItemTypeOfSequence, getOperandRoles, getStringValue, getStringValueCS, getTypedValue, isArray, isKnownToConform, isMap, itemAt, makeNewContext, mapToString, toShortStringargumentArraygetLength, head, isStreamed, iterate, iterator, reduce, subsequence, toGroundedValueasIterable, materializemakeRepeatablepublic RangeKey(java.lang.String min,
java.lang.String max,
java.util.TreeMap<AtomicMatchKey,java.util.List<NodeInfo>> index)
public GroundedValue<?> get(AtomicValue key)
public int size()
public boolean isEmpty()
public AtomicIterator keys()
public java.lang.Iterable<KeyValuePair> keyValuePairs()
keyValuePairs in interface MapItempublic MapItem remove(AtomicValue key)
public UType getKeyUType()
getKeyUType in interface MapItempublic MapItem addEntry(AtomicValue key, GroundedValue<?> value)
public boolean conforms(AtomicType keyType, SequenceType valueType, TypeHierarchy th)
public MapType getItemType(TypeHierarchy th)
getItemType in interface MapItemth - the type hierarchy (not used)public MapType getFunctionItemType()
getFunctionItemType in interface MapItemgetFunctionItemType in interface Functionpublic java.lang.String getDescription()
getDescription in interface MapItemgetDescription in interface Functionpublic boolean deepEquals(Function other, XPathContext context, AtomicComparer comparer, int flags)
deepEquals in interface MapItemdeepEquals in interface Functionother - 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 MapItemexport in interface FunctionXPathExceptionpublic boolean isTrustedResultType()
FunctionisTrustedResultType in interface MapItemisTrustedResultType in interface Functionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.