public static < E , B extends MutableBag < E > > SynchronizedBag < E > of ( B bag ) { return new SynchronizedBag < E > ( bag ) ; }
This method will take a MutableBag and wrap it directly in a SynchronizedBag .