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

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

There is a newer version: 1.2.2
Show newest version
package org.khasanof.executors.matcher;

import org.khasanof.annotation.methods.HandleCallback;
import org.khasanof.config.ApplicationConstants;
import org.springframework.stereotype.Component;

import java.util.Arrays;
import java.util.Map;

/**
 * Author: Nurislom
 * 
* Date: 20.06.2023 *
* Time: 21:55 *
* Package: org.khasanof.core.executors.matcher */ @Component public class SimpleCallbackMatcher extends GenericMatcher { public SimpleCallbackMatcher() { super(ApplicationConstants.MATCHER_MAP); } @Override public boolean matcher(HandleCallback handleCallback, String value) { return Arrays.stream(handleCallback.values()) .anyMatch(any -> matchFunctions.get(Map.entry(handleCallback.scope(), getScopeType(value, handleCallback.scope()))).apply(any, value)); } @Override public Class getType() { return HandleCallback.class; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy