public synchronized long addValue ( String value ) { sequences . add ( ++ lastSequence ) ; values . add ( value ) ; return lastSequence ; }
Adds a value to the map assigning it a sequence number and returning it . Sequence numbers start at 1 and increment from there .