Update a table from two streams of numbers.
More...
|
static void | main (String[] args) throws InterruptedException |
|
Update a table from two streams of numbers.
This example generates dummy (x,y) pairs of numbers, accumulates them into a table, and prints the table made from these numbers.
- Author
- Sylvain Hallé Easy
Definition at line 37 of file UpdateTableStreamExample.java.
◆ main()
static void plots.UpdateTableStreamExample.main |
( |
String [] |
args | ) |
throws InterruptedException |
|
static |
We create two streams of numbers
Definition at line 40 of file UpdateTableStreamExample.java.
43 QueueSource src1 =
new QueueSource().setEvents(1, 2, 3, 4, 5);
44 QueueSource src2 =
new QueueSource().setEvents(2, 3, 5, 7, 4);
50 UpdateTable table =
new UpdateTableStream(
"x",
"y");
57 Connector.connect(src1, OUTPUT, table, TOP);
58 Connector.connect(src2, OUTPUT, table, BOTTOM);
61 Pump pump =
new Pump();
62 Print print =
new Print().setSeparator(
"\n");
63 Connector.connect(table, pump, print);
The documentation for this class was generated from the following file: