All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.devocative.artemis.Util Maven / Gradle / Ivy

There is a newer version: 2.0
Show newest version
package org.devocative.artemis;

import org.devocative.artemis.xml.INameTheValue;

import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

public class Util {
	public static Map asMap(List list) {
		return list == null ? Collections.emptyMap() :
			list
				.stream()
				.collect(Collectors.toMap(INameTheValue::getName, INameTheValue::getValue));
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy