public int length(char[] pattern) {
      if (myPattern != null) {
        return myPattern.length;
      }
      return pattern.length + numMisses(Integer.MAX_VALUE);
    }
public int length(char[] pattern)