@@ -67,17 +67,15 @@ Note that you could instead just create a `MappingOrderedSet` instead:
6767 // ...
6868```
6969
70- ## Mapping vs Comparing vs Queryable
70+ ## Mapping vs Comparing
7171
72- There are three main implementations of the ` OrderedSet ` interface:
72+ There are two main implementations of the ` OrderedSet ` interface:
7373
7474* ` ComparingOrderedSet ` : the simplest implementation, takes in a ` Comparator ` and does not cache
7575 priorities. It uses Dart's ` SplayTreeSet ` as a backing implementation.
7676* ` MappingOrderedSet ` : a slightly more advanced implementation that takes in a mapper function
7777 (maps elements to their priorities) and caches them. It uses Dart's ` SplayTreeMap ` as a backing
7878 implementation.
79- * ` QueryableOrderedSet ` : a simple wrapper over either ` OrderedSet ` that allows for O(1) type
80- queries; if you find yourself doing ` .whereType<T>() ` a lot, you should consider using this.
8179
8280In order to create an ` OrderedSet ` , however, you can just use the static methods on the interface
8381itself:
@@ -90,7 +88,19 @@ itself:
9088 a ` MappingOrderedSet ` with identity mapping.
9189* ` OrderedSet.simple<E>() ` : if ` E extends Comparable<E> ` , this is an even simpler way of creating
9290 a ` MappingOrderedSet ` with identity mapping.
93- * ` OrderedSet.queryable<E>(orderedSet) ` : wraps the given ` OrderedSet ` into a ` QueryableOrderedSet ` .
91+
92+ ## Querying
93+
94+ You can [ register] a set of queries, i.e., predefined sub-types, whose results,
95+ i.e., subsets of this set, are then cached.
96+ Since the queries have to be type checks, and types are runtime constants, this
97+ can be vastly optimized.
98+
99+ You can then filter by type by using the [ query] method (or using [ whereType] ;
100+ which is overridden).
101+
102+ Note that you can change [ strictMode] to allow for querying for unregistered
103+ types; if you do so, the registration cost is payed on the first query.
94104
95105## Contributing
96106
0 commit comments