Class StringComparator

java.lang.Object
com.udojava.evalex.AbstractLazyFunction
me.hsgamer.hscore.expression.StringComparator
All Implemented Interfaces:
com.udojava.evalex.LazyFunction
Direct Known Subclasses:
Contains, EndsWith, Equals, EqualsIgnoreCase, MatchPattern, StartsWith

public abstract class StringComparator extends com.udojava.evalex.AbstractLazyFunction
The String Comparator
  • Field Summary

    Fields inherited from class com.udojava.evalex.AbstractLazyFunction

    booleanFunction, name, numParams
  • Constructor Summary

    Constructors
    Constructor
    Description
    StringComparator(@NotNull String name)
    Create new comparator
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract boolean
    compare(@NotNull String s1, @NotNull String s2)
    Compare the two strings
    @NotNull com.udojava.evalex.Expression.LazyNumber
    lazyEval(@NotNull List<com.udojava.evalex.Expression.LazyNumber> lazyParams)
     

    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

    • StringComparator

      public StringComparator(@NotNull @NotNull String name)
      Create new comparator
      Parameters:
      name - the prefix of the comparator
  • Method Details

    • compare

      public abstract boolean compare(@NotNull @NotNull String s1, @NotNull @NotNull String s2)
      Compare the two strings
      Parameters:
      s1 - the 1st string
      s2 - the 2nd string
      Returns:
      the result
    • lazyEval

      @NotNull public @NotNull com.udojava.evalex.Expression.LazyNumber lazyEval(@NotNull @NotNull List<com.udojava.evalex.Expression.LazyNumber> lazyParams)