Example usage for org.springframework.util MultiValueMap forEach

List of usage examples for org.springframework.util MultiValueMap forEach

Introduction

In this page you can find the example usage for org.springframework.util MultiValueMap forEach.

Prototype

default void forEach(BiConsumer<? super K, ? super V> action) 

Source Link

Document

Performs the given action for each entry in this map until all entries have been processed or the action throws an exception.

Usage

From source file:io.curly.bloodhound.query.PossibilitiesResolver.java

/**
 * Main method to convert the user inputted keys into our pattern
 *
 * @param raw the map containing not standardized keys
 * @return transformed new map with correct keys
 *///from  w w w.  ja v a2s  .c  o m
@Override
public MultiValueMap<String, String> resolve(MultiValueMap<String, String> raw) {
    Assert.notNull(raw, "Raw MultiValueMap must be not null!");
    MultiValueMap<String, String> output = new LinkedMultiValueMap<>(raw.size());
    raw.forEach((key, value) -> transform(output, key, value));
    return output;
}