void add(CharSequence key,CharSequence cmd){
  if (key == null || cmd == null) {
    return;
  }
  if (cmd.length() == 0) {
    return;
  }
  int id_cmd=cmds.indexOf(cmd);
  if (id_cmd == -1) {
    id_cmd=cmds.size();
    cmds.add(cmd);
  }
  int node=root;
  Row r=getRow(node);
  StrEnum e=new StrEnum(key,forward);
  for (int i=0; i < e.length() - 1; i++) {
    Character ch=new Character(e.next());
    node=r.getRef(ch);
    if (node >= 0) {
      r=getRow(node);
    }
 else {
      node=rows.size();
      Row n;
      rows.add(n=new Row());
      r.setRef(ch,node);
      r=n;
    }
  }
  r.setCmd(new Character(e.next()),id_cmd);
}

void add ( CharSequence key , CharSequence cmd ) { if ( key == null || cmd == null ) { return ; } if ( cmd . length ( ) == 0 ) { return ; } int id_cmd = cmds . indexOf ( cmd ) ; if ( id_cmd == - 1 ) { id_cmd = cmds . size ( ) ; cmds . add ( cmd ) ; } int node = root ; Row r = getRow ( node ) ; StrEnum e = new StrEnum ( key , forward ) ; for ( int i = 0 ; i < e . length ( ) - 1 ; i ++ ) { Character ch = new Character ( e . next ( ) ) ; node = r . getRef ( ch ) ; if ( node >= 0 ) { r = getRow ( node ) ; } else { node = rows . size ( ) ; Row n ; rows . add ( n = new Row ( ) ) ; r . setRef ( ch , node ) ; r = n ; } } r . setCmd ( new Character ( e . next ( ) ) , id_cmd ) ; }
add the given key associated with the given patch command . if either parameter is null this method will return without executing .
