Class BMHMatch

java.lang.Object
io.github.connellite.match.BMHMatch

public class BMHMatch extends Object
Boyer–Moore–style substring search over CharSequence.

BMHMatch.Strategy.BAD_CHARACTER uses the bad-character rule only (classic BM shift on mismatch; after a full match, shift uses the character aligned just past the window when possible). BMHMatch.Strategy.GOOD_SUFFIX adds strong good-suffix preprocessing (Boyer–Moore style) via shift/bpos tables.

Both strategies compare UTF-16 code units (CharSequence.charAt(int)), like String. Time is sublinear on average for long alphabets; worst case depends on the variant.

  • Constructor Details

    • BMHMatch

      public BMHMatch()
  • Method Details