Class RabinKarpHash

java.lang.Object
gw.internal.gosu.util.RabinKarpHash

public class RabinKarpHash extends Object
Fast multi-pattern string matcher. Quick and dirty implementation of Rabin-Karp algorithm. Used for paths matching. We mach patterns from the end to reduce amount of possible collisions (filesystem paths tend to have common prefixes, like package names, etc). FIXME: Tests...
See Also:
  • Constructor Details

    • RabinKarpHash

      public RabinKarpHash(String... patterns)
  • Method Details

    • matches

      public boolean matches(String str)