Class MatchPattern

java.lang.Object
com.udojava.evalex.AbstractLazyFunction
me.hsgamer.hscore.expression.StringComparator
me.hsgamer.hscore.expression.string.MatchPattern
All Implemented Interfaces:
com.udojava.evalex.LazyFunction

public class MatchPattern extends StringComparator
Check if the 1st string matches the RegEx pattern from the 2nd string
Ex: STRMP("String", "String-?")
  • Field Summary

    Fields inherited from class com.udojava.evalex.AbstractLazyFunction

    booleanFunction, name, numParams
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    compare(@NotNull String s1, @NotNull String s2)
    Compare the two strings

    Methods inherited from class me.hsgamer.hscore.expression.StringComparator

    lazyEval

    Methods inherited from class com.udojava.evalex.AbstractLazyFunction

    getName, getNumParams, isBooleanFunction, numParamsVaries

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MatchPattern

      public MatchPattern()
  • Method Details

    • compare

      public boolean compare(@NotNull @NotNull String s1, @NotNull @NotNull String s2)
      Description copied from class: StringComparator
      Compare the two strings
      Specified by:
      compare in class StringComparator
      Parameters:
      s1 - the 1st string
      s2 - the 2nd string
      Returns:
      the result