org.devocative.artemis.Util Maven / Gradle / Ivy
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 extends INameTheValue> list) {
return list == null ? Collections.emptyMap() :
list
.stream()
.collect(Collectors.toMap(INameTheValue::getName, INameTheValue::getValue));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy