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

com.icthh.xm.commons.lep.impl.engine.OriginalMethodLepExecutor Maven / Gradle / Ivy

There is a newer version: 4.0.21
Show newest version
package com.icthh.xm.commons.lep.impl.engine;

import com.icthh.xm.commons.lep.api.LepEngine;
import com.icthh.xm.commons.lep.api.LepExecutor;

import java.util.function.Function;
import java.util.function.Supplier;

public class OriginalMethodLepExecutor extends DefaultLepExecutor {
    public OriginalMethodLepExecutor() {
        super(null);
    }

    @Override
    public LepExecutor ifLepPresent(Function executeLepMethod) {
        return this;
    }

    @Override
    public LepExecutor ifLepNotExists(Supplier executeOriginalMethod) {
        setMethodResult(executeOriginalMethod.get());
        return this;
    }

    @Override
    public Object getMethodResult() {
        return super.getMethodResult();
    }
}