question: 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 ( ) ; } }
target:  This is the method used during encoding.