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 uses LinkedHashMap (which preserves insertion order) as a result container, and returns map.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.
    • Method Detail

      • container

        default java.util.Map<K,​V> container()
        Description copied from interface: RowReducer
        Returns a new, empty result container.
        Specified by:
        container in interface RowReducer<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: RowReducer
        Returns a stream of result elements from the result container.
        Specified by:
        stream in interface RowReducer<K,​V>
        Parameters:
        container - the result container
        Returns:
        stream of result elements.