class FindFromNullableReference<
    ENTITY, FK_ENTITY,
    V extends Comparable<? super V>,
    SOURCE extends Field<ENTITY>
                 & HasReferenceOperators<ENTITY>
                 & HasReferenceValue<ENTITY, ?, V>,
    TARGET extends Field<FK_ENTITY>
                 & HasComparableOperators<FK_ENTITY, V>
> extends AbstractFindFromNullable<ENTITY, FK_ENTITY, V, SOURCE, TARGET>
implements FindFromNullable<ENTITY, FK_ENTITY> {

    public FindFromNullableReference(
            SOURCE source,
            TARGET target,
            TableIdentifier<FK_ENTITY> foreignTable,
            Supplier<Stream<FK_ENTITY>> streamSupplier) {

        super(source, target, foreignTable, streamSupplier);
    }

    @Override
    public boolean isPresent(ENTITY entity) {
        return getSourceField().isNotNull().test(entity);
    }

    @Override
    public FK_ENTITY applyOrThrow(ENTITY entity) {<FILL_FUNCTION_BODY>}

    @Override
    public Stream<FK_ENTITY> apply(ENTITY entity) {
        return stream().filter(
            getTargetField().equal(getSourceField().get(entity))
        );
    }
}


        return apply(entity).findAny()
            .orElseThrow(() -> new IllegalArgumentException(format(
                "Specified entity '%s' does not reference any %s.",
                entity, getTableIdentifier()
            )));
    
<methods>public final SOURCE getSourceField() ,public final TableIdentifier<FK_ENTITY> getTableIdentifier() ,public final TARGET getTargetField() <variables>private final non-sealed TableIdentifier<FK_ENTITY> identifier,private final non-sealed SOURCE source,private final non-sealed Supplier<Stream<FK_ENTITY>> streamSupplier,private final non-sealed TARGET target