Example usage for org.apache.solr.common.util NamedList forEach

List of usage examples for org.apache.solr.common.util NamedList forEach

Introduction

In this page you can find the example usage for org.apache.solr.common.util NamedList forEach.

Prototype

public void forEach(BiConsumer<String, T> action) 

Source Link

Usage

From source file:uk.co.flax.biosolr.FacetTreeParameters.java

License:Apache License

/**
 * Construct the tree parameters from the arguments passed to the
 * component.//from  www  .  ja  v a 2 s .c  o  m
 * @param args the arguments passed to the component.
 */
public FacetTreeParameters(NamedList<? extends Object> args) {
    // Find "defaults" list
    @SuppressWarnings({ "unchecked", "rawtypes" })
    NamedList<? extends Object> defaultArgs = (NamedList) args.get(PluginInfo.DEFAULTS);

    if (defaultArgs != null) {
        // Assume all of the args are single strings for now
        defaultArgs.forEach(entry -> {
            defaults.put(entry.getKey(), (String) entry.getValue());
        });
    }
}