Here you can find the source of search(List
public static Map<String, String> search(List<String> properties, String term)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static Map<String, String> search(List<String> properties, String term) { Map<String, String> collect = properties.stream().filter(line -> line.split("=")[0].contains(term)) .map(line -> {//from w w w . j ava 2 s . c o m Map<String, String> stringStringHashMap = new HashMap<>(); stringStringHashMap.put(line.split("=")[0], line.split("=")[1]); return stringStringHashMap; }).reduce((stringStringMap, stringStringMap2) -> { stringStringMap.putAll(stringStringMap2); return stringStringMap; }).get(); return collect; } }