org.khasanof.executors.matcher.SimpleHandlerAnyMatcher Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-boot-starter-fluent Show documentation
Show all versions of spring-boot-starter-fluent Show documentation
Fluent - Easy Telegram Bots with Spring
The newest version!
package org.khasanof.executors.matcher;
import org.khasanof.annotation.methods.HandleAny;
import org.khasanof.enums.HandleType;
import org.khasanof.service.expression.ExpressionMatcherService;
import org.springframework.stereotype.Component;
import java.util.Arrays;
/**
* @author Nurislom
* @see org.khasanof.executors.matcher
* @since 25.06.2023 22:50
*/
@Component
public class SimpleHandlerAnyMatcher extends GenericMatcher {
public SimpleHandlerAnyMatcher(ExpressionMatcherService expressionMatcherService) {
super(expressionMatcherService);
}
@Override
public boolean matcher(HandleAny annotation, HandleType value) {
return Arrays.asList(annotation.type()).contains(value);
}
}