Package org.apache.calcite.linq4j
Class LookupImpl<K,V>
- java.lang.Object
-
- org.apache.calcite.linq4j.DefaultEnumerable<T>
-
- org.apache.calcite.linq4j.AbstractEnumerable<Grouping<K,V>>
-
- org.apache.calcite.linq4j.LookupImpl<K,V>
-
- Type Parameters:
K- Key typeV- Value type
- All Implemented Interfaces:
Iterable<K>,Map<K,V>,Enumerable<K>,ExtendedEnumerable<K>,ExtendedOrderedEnumerable<K>,Lookup<K,V>,OrderedEnumerable<K>,RawEnumerable<K>
class LookupImpl<K,V> extends AbstractEnumerable<Grouping<K,V>> implements Lookup<K,V>
Implementation ofLookupthat uses an underlying map.
-
-
Constructor Summary
Constructors Constructor Description LookupImpl(Map<K,List<V>> map)Creates a MultiMapImpl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <TResult> Enumerable<TResult>applyResultSelector(Function2<K,Enumerable<V>,TResult> resultSelector)Applies a transform function to each key and its associated values and returns the results.voidclear()booleancontainsKey(Object key)booleancontainsValue(Object value)Set<Map.Entry<K,Enumerable<V>>>entrySet()Enumerator<Grouping<K,V>>enumerator()Returns an enumerator that iterates through a collection.Enumerable<V>get(Object key)booleanisEmpty()Set<K>keySet()Enumerable<V>put(K key, Enumerable<V> value)voidputAll(Map<? extends K,? extends Enumerable<V>> m)Enumerable<V>remove(Object key)intsize()Collection<Enumerable<V>>values()Enumerable<V>valuesEnumerable()Returns an enumerable over the values in this lookup, in map order.-
Methods inherited from class org.apache.calcite.linq4j.AbstractEnumerable
iterator
-
Methods inherited from class org.apache.calcite.linq4j.DefaultEnumerable
aggregate, aggregate, aggregate, all, any, any, asEnumerable, asOrderedQueryable, asQueryable, average, average, average, average, average, average, average, average, average, average, cast, concat, contains, contains, correlateJoin, count, count, createOrderedEnumerable, defaultIfEmpty, defaultIfEmpty, distinct, distinct, elementAt, elementAtOrDefault, except, except, first, first, firstOrDefault, firstOrDefault, foreach, getThis, getThisOrdered, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupJoin, groupJoin, intersect, intersect, into, join, join, join, last, last, lastOrDefault, lastOrDefault, longCount, longCount, max, max, max, max, max, max, max, max, max, max, max, max, min, min, min, min, min, min, min, min, min, min, min, min, ofType, orderBy, orderBy, orderByDescending, orderByDescending, removeAll, reverse, select, select, selectMany, selectMany, selectMany, selectMany, sequenceEqual, sequenceEqual, single, single, singleOrDefault, singleOrDefault, skip, skipWhile, skipWhile, sum, sum, sum, sum, sum, sum, sum, sum, sum, sum, take, takeWhile, takeWhile, thenBy, thenBy, thenByDescending, thenByDescending, toList, toLookup, toLookup, toLookup, toLookup, toMap, toMap, toMap, toMap, union, union, where, where, zip
-
Methods inherited from interface org.apache.calcite.linq4j.Enumerable
asQueryable
-
Methods inherited from interface org.apache.calcite.linq4j.ExtendedEnumerable
aggregate, aggregate, aggregate, all, any, any, asEnumerable, average, average, average, average, average, average, average, average, average, average, cast, concat, contains, contains, correlateJoin, count, count, defaultIfEmpty, defaultIfEmpty, distinct, distinct, elementAt, elementAtOrDefault, except, except, first, first, firstOrDefault, firstOrDefault, foreach, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupJoin, groupJoin, intersect, intersect, into, join, join, join, last, last, lastOrDefault, lastOrDefault, longCount, longCount, max, max, max, max, max, max, max, max, max, max, max, max, min, min, min, min, min, min, min, min, min, min, min, min, ofType, orderBy, orderBy, orderByDescending, orderByDescending, removeAll, reverse, select, select, selectMany, selectMany, selectMany, selectMany, sequenceEqual, sequenceEqual, single, single, singleOrDefault, singleOrDefault, skip, skipWhile, skipWhile, sum, sum, sum, sum, sum, sum, sum, sum, sum, sum, take, takeWhile, takeWhile, toList, toLookup, toLookup, toLookup, toLookup, toMap, toMap, toMap, toMap, union, union, where, where, zip
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
Method Detail
-
enumerator
public Enumerator<Grouping<K,V>> enumerator()
Description copied from interface:RawEnumerableReturns an enumerator that iterates through a collection.- Specified by:
enumeratorin interfaceRawEnumerable<K>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValuein interfaceMap<K,V>
-
put
public Enumerable<V> put(K key, Enumerable<V> value)
-
putAll
public void putAll(Map<? extends K,? extends Enumerable<V>> m)
-
values
public Collection<Enumerable<V>> values()
-
entrySet
public Set<Map.Entry<K,Enumerable<V>>> entrySet()
-
applyResultSelector
public <TResult> Enumerable<TResult> applyResultSelector(Function2<K,Enumerable<V>,TResult> resultSelector)
Description copied from interface:LookupApplies a transform function to each key and its associated values and returns the results.- Specified by:
applyResultSelectorin interfaceLookup<K,V>- Type Parameters:
TResult- Result type- Parameters:
resultSelector- Result selector- Returns:
- Enumerable over results
-
valuesEnumerable
public Enumerable<V> valuesEnumerable()
Returns an enumerable over the values in this lookup, in map order. If the map is sorted, the values will be emitted sorted by key.
-
-