class FieldToBooleanImpl<ENTITY, V>
    extends AbstractFieldMapper<ENTITY, V, Boolean, ToBoolean<ENTITY>, ToBooleanFunction<V>>
    implements FieldToBoolean<ENTITY, V> {

    public FieldToBooleanImpl(
        final ReferenceField<ENTITY, ?, V> field,
        final ToBooleanFunction<V> mapper
    ) {
        super(field, mapper);
    }

    @Override
    public Boolean apply(ENTITY entity) {<FILL_FUNCTION_BODY>}

    @Override
    public boolean applyAsBoolean(ENTITY object) {
        return mapper.applyAsBoolean(field.get(object));
    }
}

        final V value = field.get(entity);
        if (value == null) return null;
        else return mapper.applyAsBoolean(value);
    
<methods>public ReferenceField<ENTITY,?,V> getField() ,public ToBooleanFunction<V> getMapper() ,public FieldIsNotNullPredicate<ENTITY,java.lang.Boolean> isNotNull() ,public FieldIsNullPredicate<ENTITY,java.lang.Boolean> isNull() <variables>final non-sealed ReferenceField<ENTITY,?,V> field,final non-sealed ToBooleanFunction<V> mapper