Discard events from an input trace with the Filter processor.
More...
|
static void | main (String[] args) |
|
Discard events from an input trace with the Filter processor.
This example can be represented grahpically as:
- Author
- Sylvain Hallé Easy
Definition at line 37 of file FilterSimple.java.
◆ main()
static void basic.FilterSimple.main |
( |
String [] |
args | ) |
|
|
static |
Create a first trace of dummy values
Definition at line 39 of file FilterSimple.java.
42 QueueSource source_values =
new QueueSource();
43 source_values.setEvents(6, 5, 3, 8, 9, 2, 1, 7, 4);
45 QueueSource source_bool =
new QueueSource();
46 source_bool.setEvents(
true,
false,
true,
true,
47 false,
false,
true,
false,
true);
49 Filter filter =
new Filter();
51 connect(source_values, OUTPUT, filter, TOP);
52 connect(source_bool, OUTPUT, filter, BOTTOM);
54 Pullable p = filter.getPullableOutput();
56 for (
int i = 0; i < 5; i++)
58 int x = (Integer) p.pull();
59 System.out.printf(
"Output event #%d is %d\n", i, x);
The documentation for this class was generated from the following file: