public BoyerMooreMatcher(String pattern){
  this.pattern=pattern;
  this.occurrence=new HashMap<>();
  for (int i=0; i < pattern.length(); i++) {
    occurrence.put(pattern.charAt(i),i);
  }
}

public BoyerMooreMatcher ( String pattern ) { this . pattern = pattern ; this . occurrence = new HashMap < > ( ) ; for ( int i = 0 ; i < pattern . length ( ) ; i ++ ) { occurrence . put ( pattern . charAt ( i ) , i ) ; } }
prepare the matcher with the string that need to be searched
