public int add(DefineTag tag){
  assert (tag != null);
  Integer obj=tags.get(tag);
  if (obj != null) {
    return obj.intValue();
  }
 else {
    Integer key=new Integer(nextId++);
    tags.put(tag,key);
    ids.put(key,tag);
    return key.intValue();
  }
}

public int add ( DefineTag tag ) { assert ( tag != null ) ; Integer obj = tags . get ( tag ) ; if ( obj != null ) { return obj . intValue ( ) ; } else { Integer key = new Integer ( nextId ++ ) ; tags . put ( tag , key ) ; ids . put ( key , tag ) ; return key . intValue ( ) ; } }
this is the method used during encoding .
