> -   public Iterable<Instance> listNodes() {
> -      return api.getInstanceApiForProject(userProject.get()).list().concat();
> +   public Iterable<InstanceInZone> listNodes() {
> +      return 
> FluentIterable.from(zones.get().values()).transformAndConcat(new 
> Function<Location, ImmutableSet<InstanceInZone>>() {
> +         @Override
> +         public ImmutableSet<InstanceInZone> apply(final Location input) {
> +            return 
> api.getInstanceApiForProject(userProject.get()).listInZone(input.getId()).concat()
> +                    .transform(new Function<Instance, InstanceInZone>() {
> +
> +                       @Override
> +                       public InstanceInZone apply(Instance arg0) {
> +                          return new InstanceInZone(arg0, input.getId());
> +                       }
> +                    }).toSet();
> +         }
> +      }).toSet();

Again, https://code.google.com/p/guava-libraries/wiki/FunctionalExplained?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/16/files#r5362252

Reply via email to