Code Examples
A repository of 155 code examples for BeepBeep
basic.TrimPush Class Reference

Use the Trim processor to discard events from the beginning of a stream. More...

Static Public Member Functions

static void main (String[] args)
 

Detailed Description

Use the Trim processor to discard events from the beginning of a stream.

The chain of processors in this example can be represented graphically as:

Processor graph
See also
PipingBinary
Author
Sylvain Hallé Easy

Definition at line 36 of file TrimPush.java.

Member Function Documentation

◆ main()

static void basic.TrimPush.main ( String []  args)
static

Create an instance of the Trim processor. This processor is

Definition at line 38 of file TrimPush.java.

39  {
40  /// Create an instance of the Trim processor. This processor is
41  // instructed to discard the first 3 events it receives.
42  Trim trim = new Trim(3);
43 
44  /* Connect the trim processor to a Print processor. */
45  Print print = new Print();
46  Connector.connect(trim, print);
47 
48  /* Let us now print what we receive by pushing events into trim. */
49  Pushable p = trim.getPushableInput();
50  for (int i = 0; i < 6; i++)
51  {
52  p.push(i);
53  }
54  ///
55  }

The documentation for this class was generated from the following file: