Created
November 2, 2016 13:29
-
-
Save korzha/9dfa0ca5ccfed3def097aefc59ea1e32 to your computer and use it in GitHub Desktop.
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
public class Scratch implements EntryPoint { | |
@Override | |
public void onModuleLoad() { | |
testStream(1, 2, 3); | |
} | |
private String createString(Integer n) { | |
return "" + n; | |
} | |
private void testStream(Integer... numbers) { | |
ArrayList<String> list = new ArrayList<>(); | |
Stream.of(numbers).map(this::createString).forEach(list::add); | |
GWT.log(list.toString()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment