A bit "prettier" syntax with FluentIterableFluentIterable (since Guava 12):
ImmutableList<String> resourceIds = FluentIterable.from(matchingComputers) .transform(getResourceId) .filter(Predicates.notNull()) .toList(); static final Function<Computer, String> getResourceId = new Function<Computer, String>() { @Override public String apply(Computer computer) { return computer.getResourceId(); } }; Note that the returned list is an ImmutableList. However, you can use copyInto() method to pour the elements into an arbitrary collection.