All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.link_intersystems.util.TransformedPredicate Maven / Gradle / Ivy

Go to download

There is a newer version: 1.9.7
Show newest version
package com.link_intersystems.util;

import java.util.function.Predicate;

/**
 * @author René Link {@literal }
 */
public class TransformedPredicate implements Predicate {

    private Transformer transformer;
    private Predicate resultPredicate;

    public TransformedPredicate(Transformer transformer, Predicate resultPredicate) {
        this.transformer = transformer;
        this.resultPredicate = resultPredicate;
    }

    @Override
    public boolean test(S t) {
        T transformed = transformer.transform(t);
        return resultPredicate.test(transformed);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy