com.vmlens.report.description.ContainerMapAdapter Maven / Gradle / Ivy
package com.vmlens.report.description;
import com.vmlens.report.container.Container;
import java.util.Map;
public class ContainerMapAdapter {
private final Map map;
public ContainerMapAdapter(Map map) {
this.map = map;
}
public String getName(KEY key) {
if (!map.containsKey(key)) {
return notFound(key);
}
String result = map.get(key).getName();
if (result == null) {
return notFound(key);
}
return result;
}
private String notFound(KEY key) {
return String.format("not found (%s)", key);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy