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

com.jdiai.page.objects.SetupRule Maven / Gradle / Ivy

There is a newer version: 1.1.8
Show newest version
package com.jdiai.page.objects;

import java.util.function.Consumer;
import java.util.function.Function;

import static com.epam.jdi.tools.ReflectionUtils.isInterface;

public class SetupRule {
    public static SetupRule sRule(Function condition, Consumer action) {
        return new SetupRule(condition, action);
    }
    public static SetupRule sRule(Class interfaceClass, Consumer action) {
        return sRule(i -> isInterface(i.instanceClass(), interfaceClass), action);
    }

    public Function condition;
    public Consumer action;

    public SetupRule(Function condition, Consumer action) {
        this.condition = condition;
        this.action = action;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy