private boolean keyMatch(String key,LazyNode token){
  if (token.type == LazyNode.EFIELD) {
    String field=token.getStringValue(cbuf);
    return field.equals(key);
  }
 else {
    int length=key.length();
    if (token.endIndex - token.startIndex != length) {
      return false;
    }
    for (int i=0; i < length; i++) {
      char c=key.charAt(i);
      if (c != cbuf[token.startIndex + i]) {
        return false;
      }
    }
    return true;
  }
}

private boolean keyMatch ( String key , LazyNode token ) { if ( token . type == LazyNode . EFIELD ) { String field = token . getStringValue ( cbuf ) ; return field . equals ( key ) ; } else { int length = key . length ( ) ; if ( token . endIndex - token . startIndex != length ) { return false ; } for ( int i = 0 ; i < length ; i ++ ) { char c = key . charAt ( i ) ; if ( c != cbuf [ token . startIndex + i ] ) { return false ; } } return true ; } }
utility method to evaluate wether a given string matches the value of a field .
