> +              .filter(new Predicate<OperatingSystem>() {
> +                 @Override
> +                 public boolean apply(OperatingSystem input) {
> +                    return input.getId().contains(imageId);
> +                 }
> +              }), Predicates.notNull());
> +   }
> +
> +   private Optional<OperatingSystem> 
> tryExtractOperatingSystemFrom(VirtualGuestBlockDeviceTemplateGroup image) {
> +      return FluentIterable.from(image.getChildren())
> +              .transformAndConcat(new 
> BlockDeviceTemplateGroupToBlockDeviceTemplateIterable())
> +              .filter(new IsBootableDevice())
> +              .transformAndConcat(new 
> VirtualGuestBlockDeviceTemplateIterableFunction())
> +              .transform(new DiskImageSoftwareToSoftwareDescription())
> +              .filter(new IsOperatingSystem())
> +              .transform(new 
> SoftwareDescriptionToOperatingSystem(image.getGlobalIdentifier()))

Do all the functions being passed here need to be instantiated each time? Or 
could we use a singleton for them?

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

Reply via email to