Class MatcherConfig.MatcherConfigBuilder

java.lang.Object
xyz.ronella.trivial.handy.impl.MatcherConfig.MatcherConfigBuilder
Enclosing class:
MatcherConfig

public static final class MatcherConfig.MatcherConfigBuilder extends Object
The only class the can create an instance of MatcherConfig.
Since:
2.11.0
  • Method Details

    • setMatchLogic

      public MatcherConfig.MatcherConfigBuilder setMatchLogic(Function<Matcher,Boolean> matchLogic)
      Must return how the matching logic will be performed.
      Parameters:
      matchLogic - The matching logic.
      Returns:
      An instance of MatcherConfigBuilder.
    • setMatchFoundLogic

      public MatcherConfig.MatcherConfigBuilder setMatchFoundLogic(Consumer<Matcher> matchFoundLogic)
      Must return how the match found logic will be performed.
      Parameters:
      matchFoundLogic - The match found logic.
      Returns:
      An instance of MatcherConfigBuilder.
    • setNoMatchFoundLogic

      public MatcherConfig.MatcherConfigBuilder setNoMatchFoundLogic(Consumer<Matcher> noMatchFoundLogic)
      Must return how the no match found logic will be performed.
      Parameters:
      noMatchFoundLogic - The no match found logic.
      Returns:
      An instance of MatcherConfigBuilder.
    • setExceptionLogic

      public MatcherConfig.MatcherConfigBuilder setExceptionLogic(Consumer<RuntimeException> exceptionLogic)
      Must return how the exception logic will be performed.
      Parameters:
      exceptionLogic - The exception logic.
      Returns:
      An instance of MatcherConfigBuilder.
    • build

      public MatcherConfig build()
      Build an instance of MatcherConfig.
      Returns:
      An instance of MatcherConfig.
    • build

      public MatcherConfig build(int patternFlags)
      Build an instance of MatcherConfig with pattern flags.
      Parameters:
      patternFlags - The pattern flags to use.
      Returns:
      An instance of MatcherConfig.