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

org.khasanof.executors.matcher.SimpleCallbackMatcher Maven / Gradle / Ivy

The newest version!
package org.khasanof.executors.matcher;

import org.khasanof.annotation.methods.HandleCallback;
import org.khasanof.service.expression.ExpressionMatcherService;
import org.springframework.stereotype.Component;

import java.util.Arrays;

/**
 * Author: Nurislom
 * 
* Date: 20.06.2023 *
* Time: 21:55 *
* Package: org.khasanof.core.executors.matcher */ @Component public class SimpleCallbackMatcher extends GenericMatcher { public SimpleCallbackMatcher(ExpressionMatcherService expressionMatcherService) { super(expressionMatcherService); } @Override public boolean matcher(HandleCallback handleCallback, String value) { return Arrays.stream(handleCallback.value()) .anyMatch(annValue -> expressionMatcherService.match(handleCallback.match(), annValue, value)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy