Can even use `Iterables.filter(locations, SshMachineLocation.class)`, given that it's only passed to an `Iterables` method afterwards. That would save the subsequent casting as well.