public static <T>Iterable<T> synchronizedCreateIterable(Collection<T> collection){
  Iterable<T> iterable;
synchronized (collection) {
    iterable=new ArrayList<T>(collection);
  }
  return iterable;
}

public static < T > Iterable < T > synchronizedCreateIterable ( Collection < T > collection ) { Iterable < T > iterable ; synchronized ( collection ) { iterable = new ArrayList < T > ( collection ) ; } return iterable ; }
synchronizes on the given collection , and returns a copy suitable for iteration .
