Package net.sf.saxon.ma.map
Class RangeKey
java.lang.Object
net.sf.saxon.ma.map.MapItem
net.sf.saxon.ma.map.RangeKey
- All Implemented Interfaces:
- Callable,- FunctionItem,- GroundedValue,- Item,- Sequence
This class implements an XPath map item as a view of an XSLT key index. It is possible to specify a minimum
 and maximum key value to be included in the map, and keys are returned in sorted order.
 
At present range keys are only available for string-valued keys using the Unicode codepoint collating sequence.
- 
Constructor SummaryConstructorsConstructorDescriptionRangeKey(UnicodeString min, UnicodeString max, TreeMap<AtomicMatchKey, Object> index) 
- 
Method SummaryModifier and TypeMethodDescriptionaddEntry(AtomicValue key, GroundedValue value) Create a new map containing the existing entries in the map plus an additional entry, without modifying the original.booleanconforms(PlainType keyType, SequenceType valueType, TypeHierarchy th) Ask whether the map conforms to a given map typebooleandeepEqual40(FunctionItem other, XPathContext context, DeepEqual.DeepEqualOptions options) booleandeepEquals(FunctionItem 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 functionvoidOutput information about this function item to the diagnostic explain() outputget(AtomicValue key) Get an entry from the MapGet a description of this function for use in error messages.Get the item type of the function itemGet the type of the map.Get the lowest common item type of the keys in the mapbooleanisEmpty()Ask whether the map is emptybooleanAsk if the function can be trusted to return a result of the correct typekeys()Get the set of all key values in the map.Get the set of all key-value pairs in the mapremove(AtomicValue key) Remove an entry from the mapintsize()Get the size of the maptoString()Methods inherited from class net.sf.saxon.ma.map.MapItematomize, call, effectiveBooleanValue, entries, getAnnotations, getArity, getFunctionName, getGenre, getItemTypeOfSequence, getOperandRoles, getTypedValue, getUnicodeStringValue, isArray, isKnownToConform, isMap, itemAt, makeNewContext, mapToString, toShortStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.sf.saxon.om.FunctionItemisSequenceVariadicMethods inherited from interface net.sf.saxon.om.GroundedValueasIterable, concatenate, containsNode, materializeMethods inherited from interface net.sf.saxon.om.ItemgetLength, getStringValue, head, isStreamed, iterate, reduce, subsequenceMethods inherited from interface net.sf.saxon.om.SequencemakeRepeatable
- 
Constructor Details- 
RangeKey
 
- 
- 
Method Details- 
getGet an entry from the Map
- 
sizepublic int size()Get the size of the map
- 
isEmptypublic boolean isEmpty()Ask whether the map is empty
- 
keysGet the set of all key values in the map.
- 
keyValuePairsGet the set of all key-value pairs in the map- Specified by:
- keyValuePairsin class- MapItem
- Returns:
- an iterator over the key-value pairs
 
- 
removeRemove an entry from the map
- 
getKeyUTypeGet the lowest common item type of the keys in the map- Specified by:
- getKeyUTypein class- MapItem
- Returns:
- the most specific type to which all the keys belong. If the map is empty, return ErrorType.getInstance() (the type with no instances)
 
- 
addEntryCreate 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.
- 
conformsAsk whether the map conforms to a given map type
- 
getItemTypeGet 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.- Specified by:
- getItemTypein class- MapItem
- Parameters:
- th- the type hierarchy (not used)
- Returns:
- the type of this map
 
- 
getFunctionItemTypeGet the item type of the function item- Specified by:
- getFunctionItemTypein interface- FunctionItem
- Overrides:
- getFunctionItemTypein class- MapItem
- Returns:
- the function item's type
 
- 
getDescriptionGet a description of this function for use in error messages. For named functions, the description is the function name (as a lexical QName). For others, it might be, for example, "inline function", or "partially-applied ends-with function".- Specified by:
- getDescriptionin interface- FunctionItem
- Overrides:
- getDescriptionin class- MapItem
- Returns:
- a description of the function for use in error messages
 
- 
deepEqualspublic boolean deepEquals(FunctionItem 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- Specified by:
- deepEqualsin interface- FunctionItem
- Overrides:
- deepEqualsin class- MapItem
- Parameters:
- other- the other function item
- context- the dynamic evaluation context
- comparer- the object to perform the comparison
- flags- options for how the comparison is performed
- Returns:
- true if the two function items are deep-equal
 
- 
deepEqual40public boolean deepEqual40(FunctionItem other, XPathContext context, DeepEqual.DeepEqualOptions options) - Specified by:
- deepEqual40in interface- FunctionItem
- Overrides:
- deepEqual40in class- MapItem
 
- 
exportOutput information about this function item to the diagnostic explain() output- Specified by:
- exportin interface- FunctionItem
- Overrides:
- exportin class- MapItem
- Parameters:
- out- the destination for the information
- Throws:
- XPathException- if things go wrong
 
- 
isTrustedResultTypepublic boolean isTrustedResultType()Description copied from interface:FunctionItemAsk if the function can be trusted to return a result of the correct type- Specified by:
- isTrustedResultTypein interface- FunctionItem
- Overrides:
- isTrustedResultTypein class- MapItem
- Returns:
- true if the implementation can be trusted
 
- 
toString
 
-