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, wait
atomize, call, effectiveBooleanValue, getAnnotations, getArity, getFunctionName, getGenre, getItemTypeOfSequence, getOperandRoles, getStringValue, getStringValueCS, getTypedValue, isArray, isKnownToConform, isMap, itemAt, makeNewContext, mapToString, toShortString
argumentArray
getLength, head, isStreamed, iterate, iterator, reduce, subsequence, toGroundedValue
asIterable, materialize
makeRepeatable
public 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 MapItem
public MapItem remove(AtomicValue key)
public UType getKeyUType()
getKeyUType
in interface MapItem
public MapItem addEntry(AtomicValue key, GroundedValue<?> value)
public boolean conforms(AtomicType keyType, SequenceType valueType, TypeHierarchy th)
public MapType getItemType(TypeHierarchy th)
getItemType
in interface MapItem
th
- the type hierarchy (not used)public MapType getFunctionItemType()
getFunctionItemType
in interface MapItem
getFunctionItemType
in interface Function
public java.lang.String getDescription()
getDescription
in interface MapItem
getDescription
in interface Function
public boolean deepEquals(Function other, XPathContext context, AtomicComparer comparer, int flags)
deepEquals
in interface MapItem
deepEquals
in interface Function
other
- 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 MapItem
export
in interface Function
XPathException
public boolean isTrustedResultType()
Function
isTrustedResultType
in interface MapItem
isTrustedResultType
in interface Function
public java.lang.String toString()
toString
in class java.lang.Object
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.