Created
October 13, 2012 16:04
-
-
Save jpablo/3885136 to your computer and use it in GitHub Desktop.
java "map"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.common.collect.Iterables; | |
// ... | |
Iterable<String> items = Iterables.transform(getNodes("/List/Item", document), | |
new Function<Node, String>() { | |
public String apply(@Nullable Node node) { | |
//noinspection ConstantConditions | |
return node.getTextContent(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment