Beispiel #1
0
  @Override
  public <V> boolean match(final MatcherContext<V> context) {
    if (!context.fastStringMatching()) return super.match(context);

    if (!context.getInputBuffer().test(context.getCurrentIndex(), characters)) return false;
    context.advanceIndex(characters.length);
    context.createNode();
    return true;
  }
 @Override
 public <V> boolean match(final MatcherContext<V> context) {
   final InputBuffer buffer = context.getInputBuffer();
   final boolean success = buffer.test(context.getCurrentIndex(), chars);
   if (success) {
     context.advanceIndex(2);
     context.createNode();
   }
   return success;
 }