A SortedMap whose keys are sequences of Comparable elements. PrefixMap supports the following prefix queries:

  • Does the map contain some Entry whose key has a given prefix?
  • Retrieve all the keys of the map that have a given prefix.
  • Retrieve all the entries in the map whose keys have a given prefix.
By: Francisco Reverbel
See also SortedMap, Ranged, Map, Comparable, Entry

no type hierarchy

  • PrefixMap
    • Ranged
      • Iterable
        • Category
    • SortedMap
      • Map
        • Collection
          • Iterable
            • Category
        • Correspondence
      • Ranged
        • Iterable
          • Category
Inherited Attributes
Attributes inherited from: Object
hash, string
Attributes inherited from: Collection<Element>
empty, permutations, string
Attributes inherited from: Correspondence<Key,Item>
Attributes inherited from: Iterable<Element,Absent>
coalesced, cycled, distinct, empty, exceptLast, first, indexed, last, paired, rest, size, string
Attributes inherited from: Map<Key,Item>
coalescedMap, distinct, hash, items, keys
entriesWithPrefixshared formal {<Key->Item>*} entriesWithPrefix(Object prefix)

Returns a stream with all the entries in this map whose keys have the given prefix.

hasKeyWithPrefixshared formal Boolean hasKeyWithPrefix(Object prefix)

Returns true if this map has a key with the given prefix, or false otherwise.

keysWithPrefixshared formal {Key*} keysWithPrefix(Object prefix)

Returns a stream containing all the keys with the given prefix that are present in this map.

Inherited Methods
Methods inherited from: Object
Methods inherited from: Category<Element>
contains, containsAny, containsEvery
Methods inherited from: Collection<Element>
clone, contains
Methods inherited from: Correspondence<Key,Item>
defines, definesAny, definesEvery, get, getAll
Methods inherited from: Iterable<Element,Absent>
any, by, chain, collect, contains, count, defaultNullElements, each, every, filter, find, findLast, flatMap, fold, follow, frequencies, getFromFirst, group, indexes, interpose, iterator, locate, locateLast, locations, longerThan, map, max, narrow, partition, product, reduce, repeat, scan, select, sequence, shorterThan, skip, skipWhile, sort, spread, summarize, tabulate, take, takeWhile
Methods inherited from: Map<Key,Item>
clone, contains, defaultNullElements, defaultNullItems, defines, equals, filterKeys, get, getOrDefault, inverse, mapItems, patch
Methods inherited from: Ranged<Index,Element,Subrange>
measure, span, spanFrom, spanTo
Methods inherited from: SortedMap<Key,Item>
ascendingEntries, descendingEntries, higherEntries, lowerEntries
Nested Interfaces
Keyshared Key

The type of the keys of this PrefixMap. A Key is a non-empty sequence of KeyElements. (Key is an alias for [KeyElement+].)