@ Override public List < Object > list ( ) { lock . readLock ( ) . lock ( ) ; List < Object > objects = new ArrayList <> ( ) ; try { // TODO: make a generic deep copy utility for ( Map . Entry < String , Deque < MutablePair < DeltaType , Object > > > entry : items . entrySet ( ) ) { Deque < MutablePair < DeltaType , Object > > copiedDeltas = new LinkedList <> ( entry . getValue ( ) ) ; objects . add ( copiedDeltas ) ; } } finally { lock . readLock ( ) . unlock ( ) ; } return objects ; }
List list .