()
| 9 | |
| 10 | public class QueueBehavior { |
| 11 | static Stream<String> strings() { |
| 12 | return Arrays.stream( |
| 13 | ("one two three four five six seven " + |
| 14 | "eight nine ten").split(" ")); |
| 15 | } |
| 16 | static void test(int id, Queue<String> queue) { |
| 17 | System.out.print(id + ": "); |
| 18 | strings().map(queue::offer).count(); |