> + public int compare(BlockDevice b1, BlockDevice b2) {
> + return
> Integer.valueOf(b1.getDevice()).compareTo(Integer.valueOf(b2.getDevice()));
> + }
> + });
> + return set;
> + }
> +
> + private HashSet<NetworkComponent> getNetworkComponents(VirtualGuest
> virtualGuest) {
> + if(virtualGuest.getVirtualGuestNetworkComponents() == null) return
> null;
> + return
> Sets.newHashSet(Iterables.transform(virtualGuest.getVirtualGuestNetworkComponents(),
> + new Function<VirtualGuestNetworkComponent, NetworkComponent>()
> {
> + @Override
> + public NetworkComponent apply(VirtualGuestNetworkComponent
> input) {
> + return new NetworkComponent(input.getSpeed());
> + }
> + }));
Again, unless Guava really helps here, just use:
```
ImmutableSet.Builder networkComponents = ImmutableSet.builder();
for (VGNC networkComponent : virtualGuest.getVirtualGuestNetworkComponents()) {
networkComponents.add(new NetworkComponent(input.getSpeed());
}
return networkComponents.build();
```
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/296/files#r11324409