
io.polyglotted.common.model.HasMeta Maven / Gradle / Ivy
package io.polyglotted.common.model;
import java.util.Map;
@SuppressWarnings("unchecked")
public interface HasMeta {
SortedMapResult _meta();
default boolean hasMeta() { return !_meta().isEmpty(); }
default > T withMetas(Map map) { map.forEach(this::withMeta); return (T) this; }
default > T withMeta(String prop, Object value) { if (prop.startsWith("&")) { _meta().put(prop, value); } return (T) this; }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy