Package org.jdbi.v3.core.result
Interface LinkedHashMapRowReducer<K,V>
-
- Type Parameters:
K- the map key type--often the primary key type of<V>.V- the map value type, and the result element type--often the "master" object in a master/detail relation.
- All Superinterfaces:
RowReducer<java.util.Map<K,V>,V>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface LinkedHashMapRowReducer<K,V> extends RowReducer<java.util.Map<K,V>,V>
A row reducer that usesLinkedHashMap(which preserves insertion order) as a result container, and returnsmap.values().stream()as the final result.Implementors need only implement the
RowReducer.accumulate(Object, RowView)method.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default java.util.Map<K,V>container()Returns a new, empty result container.default java.util.stream.Stream<V>stream(java.util.Map<K,V> container)Returns a stream of result elements from the result container.-
Methods inherited from interface org.jdbi.v3.core.result.RowReducer
accumulate
-
-
-
-
Method Detail
-
container
default java.util.Map<K,V> container()
Description copied from interface:RowReducerReturns a new, empty result container.- Specified by:
containerin interfaceRowReducer<K,V>- Returns:
- a new result container.
-
stream
default java.util.stream.Stream<V> stream(java.util.Map<K,V> container)
Description copied from interface:RowReducerReturns a stream of result elements from the result container.- Specified by:
streamin interfaceRowReducer<K,V>- Parameters:
container- the result container- Returns:
- stream of result elements.
-
-