package org.globsframework.metamodel.fields;

import org.globsframework.metamodel.Field;
import org.globsframework.model.Glob;

import java.util.function.Function;

public interface BooleanField extends Field, Function<Glob, Boolean> {
    default Boolean apply(Glob glob) {
        return glob.get(this);
    }
}

@@ -156,16 +156,53 @@
 unction;
+%0Aimport java.util.function.Predicate;
 %0A%0Apublic
@@ -263,16 +263,33 @@
 Boolean%3E
+, Predicate%3CGlob%3E
  %7B%0A    d
@@ -358,11 +358,90 @@
 );%0A    %7D
+%0A%0A    default boolean test(Glob glob) %7B%0A        return glob.isTrue(this);%0A    %7D
 %0A%7D%0A

Use BooleanField as Predicate