A shorter version of the accepted answer using Guava:
.getMap(Iterables.toArray(locations, WorldLocation.class));
can be shortened further by statically importing toArray:
import static com.google.common.collect.toArray;
// ...
.getMap(toArray(locations, WorldLocation.class));