![JAR search and dependency download from the Maven repository](/logo.png)
de.tsl2.nano.modelkit.Selectable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tsl2.nano.modelkit Show documentation
Show all versions of tsl2.nano.modelkit Show documentation
TSL2 Framework to provide and use a structure of elements referenced by unique names - to declare a kit of logic in a json/yaml/xml text file
The newest version!
package de.tsl2.nano.modelkit;
import java.util.List;
import java.util.stream.Collectors;
import de.tsl2.nano.modelkit.impl.Fact;
@SuppressWarnings("unchecked")
public interface Selectable extends Configured {
boolean canSelect(T current);
default boolean canSelect(String factName, Object current) {
return get(factName, Fact.class).ask(current);
}
default List from(List list) {
return list.stream().filter(t -> canSelect(t)).collect(Collectors.toList());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy