> + api.getMachineTypeApiForProject(userProject.get())
> + .listInZone(DEFAULT_ZONE_NAME)
> + .concat()
> + .filter(new Predicate<MachineType>() {
> + @Override
> + public boolean apply(MachineType input) {
> + return input.getDeprecated().isPresent();
> + }
> + })
> + .transform(new Function<MachineType, String>() {
> + @Override
> + public String apply(MachineType input) {
> + return input.getId();
> + }
> + })
> + .toSet();
I know this is a test, but how about something like:
```
ImmutableSet.Builder<String> deprecatedMachineTypes = ImmutableSet.builder();
for (MachineType machine : api.getMachineTypeApiForProject(userProject.get())
.listInZone(DEFAULT_ZONE_NAME).concat()) {
if (input.getDeprecated().isPresent()) {
deprecatedMachineTypes.add(input.getId());
}
}
ImmutableSet<String> deprecatedMachineTypeIds = deprecatedMachineTypes.build();
```
?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/24/files#r12499844