# Glossary

This book has introduced many concepts revolving around the concept of event streams. In particular, the BeepBeep library provides a little "zoo" of dozens of `Processor` and `Function` objects. In this appendix, you will find a list of the various objects and notions that have been discussed. For entries referring to Java objects (such as processors and functions), a note next to the entry indicates whether these objects are part of BeepBeep's core, or can be found in one of its auxiliary palettes.

For more technical information about each of these objects, the reader is referred to the online API documentation, which provides in-depth and up-to-date information.

## `AbsoluteValue`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) An `UnaryFunction` provided by the `Numbers` utility class. It computes the absolute value of a number. It is represented as:

![AbsoluteValue](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqXjMgRELyGF3ciJ%2FAbsoluteValue.png?generation=1539330825209531\&alt=media)

## `Addition`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `BinaryFunction` provided by the `Numbers` utility class. It adds two numbers. It is represented as:

![Addition](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqXnUyApHOjxfZPq%2FAddition.png?generation=1539330826287587\&alt=media)

## `And`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `BinaryFunction` provided by the `Booleans` utility class. It computes the logical conjunction of its two Boolean arguments, and is represented graphically as:

![And](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqXrrtNtaTSLi8Sx%2FAnd.png?generation=1539330825780370\&alt=media)

## `AnyElement`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A 1:1 `Function` provided by the `Bags` utility class. This function takes as input a Java `Collection` *c*, and returns as its output an arbitrary element of *c*. It is represented graphically as:

![AnyElement](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqXv0FEd6nnsd-PK%2FAnyElement.png?generation=1539330826848428\&alt=media)

## `ApplyFunction`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` that applies a specific function *f* to every event *front* it receives, and returns the output of that function. The input and output *arity* of this processor are equal to the input and output arity of the underlying function. It is represented graphically as:

![ApplyFunction](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqXztO5GAN__hx_o%2FApplyFunction.png?generation=1539330826977519\&alt=media)

## `ApplyFunctionPartial`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A variant of `ApplyFunction` that attempts to evaluate a function on incomplete input event fronts. It is represented graphically as:

![ApplyFunctionPartial](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqY2IcJrfyS54Rmj%2FApplyFunctionPartial.png?generation=1539330826269195\&alt=media)

## `ApplyToAll`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A 1:1 `Function` provided by the `Bags` utility class. This function takes as input a Java `Collection` *c* and returns as its output the collection that is the result of applying a predefined 1:1 `Function` *f* to each element of *c*. It is represented graphically as:

![ApplyToAll](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqY6lE12naOeDBQF%2FApplyToAll.png?generation=1539330836995285\&alt=media)

## Arity

For a `Processor` object, refers to the number of pipes it has. The *input arity* is the number of input streams accepted by the processor, and the *output arity* is the number of output streams it produces.

For a `Function` object, refers to the number of arguments it accepts or the number of values it produces.

## `ArrayPutInto`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` provided by the `Maps` utility class. Updates a map by putting key-value pairs into it. The processor takes a single input stream, whose events are *arrays* of size 2, and repeatedly outputs a reference to the same internal `Map` object. The first element of the array contains the key, and the second contains the value that will be put into the array. Upon each input array, the processor outputs the map, updated accordingly. The processor is represented graphically as:

![ArrayPutInto](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqYA9TbCLBxesMIH%2FArrayPutInto.png?generation=1539330831902415\&alt=media)

See also `PutInto`.

## `Bags`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A container class for functions and processors applying to generic collections, i.e. "bags" of objects. Among the processors and functions provided by `Bags` are: `AnyElement`, `ApplyToAll`, `Contains`, `Explode`, `FilterElements`, `GetSize`, `Product`, `RunOn`, `ToArray`, `ToCollection`, `ToList`, and `ToSet`.

## `BinaryFunction`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Function` object having exactly two input arguments, and producing exactly one output value.

## `BlackHole`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A special type of `Sink` that discards everything it receives. It is represented graphically as follows:

![BlackHole](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqYIcmImpeNUeqsj%2FBlackHole.png?generation=1539330832893331\&alt=media)

## `Booleans`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A container class for `Function` objects related to Boolean values. For example, the static reference `Boolean.and` refers to the `Function` computing the logical conjunction of two Booleans. Among the functions provided by `Booleans` are: `And`, `Implies`, `Not` and `Or`.

## `Call`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` object calling an external command upon receiving an event, and returning the output of that command as its output stream.

![Call](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqYO3BYMKiQzBrne%2FCall.png?generation=1539330841860826\&alt=media)

## `CallbackSink`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Sink` that calls a method when a new front of events is pushed to it. Users can override that method to do some processing on these events.

## Closed (chain)

A property of a chain of processors, when either all its downstream processors are `Sink`s, or all its upstream processors are `Source`s. A chain of processors that is not closed will generally throw Java exceptions when events pass through it.

## `Concat`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `BinaryFunction` provided by the `Strings` utility class. It receives two strings as arguments, and returns the concatenation of both strings as its output value. It is represented as:

![Concat](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqYUoplHWJQetDcE%2FConcat.png?generation=1539330832325381\&alt=media)

## `Connector`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A utility class that provides a number of convenient methods for connecting the outputs of processors to the inputs of other processors. Methods provided by the `Connector` class are called `connect()` and have various signatures. When called with exactly two `Processor` arguments, `connect` assigns each output pipe of the first processor to the input pipe at the same position on the second processor.

## `Constant`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Function` object that takes no input argument, and returns a single output value. Constants are used in `FunctionTree`s to refer to fixed values. A `Constant` instance can be created out of any Java object, and returns this object as its value. When depicted in a `FunctionTree`, they are generally represented as values inside a rounded rectangle, as follows:

![Constant](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqY_o-842XgwRIc8%2FConstant.png?generation=1539330859473378\&alt=media)

## `Contains` (`Bags`)

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A 2:1 `Function` provided by the `Bags` utility class. This function takes as input a Java `Collection` *c* and an object *o*, and returns the Boolean value `true` as its output if and only if *o* is an element of *c*. It is represented graphically as:

![Contains](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqYd09_gEdLj6kIn%2FContains.png?generation=1539330830818686\&alt=media)

## `Contains` (`Strings`)

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `BinaryFunction` provided by the `Strings` utility class. It receives two strings as input, and returns the Boolean value `true` if the first contains the second. It is represented as:

![StringContains](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqYhDx27g3c15GtS%2FStringContains.png?generation=1539330837493366\&alt=media)

## `Context`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) An associative (key-value) map used by `Processor` objects to store persistent data. Each processor has its own `Context` object. When a processor is cloned, the context of the original is copied into the clone. In addition, all operations on a `Context` object are synchronized.

## `ContextAssignment`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) An object that defines the value associated to a key in a `Processor`'s `Context` object. It is represented graphically as:

![ContextAssignment](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqYnkas0pQaT6ZLA%2FContextAssignment.png?generation=1539330858172736\&alt=media)

## `ContextVariable`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Function` object that acts as a placeholder for the value associated to a key in a the `Context` of a `Processor`. When a `ContextVariable` occurs inside the `FunctionTree` assigned to an `ApplyFunction` processor, it queries that processor's `Context` object to get the current value associated to the key. It is represented graphically as:

![ContextVariable](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqYrytiizMlgHNUW%2FContextVariable.png?generation=1539330827436932\&alt=media)

By convention, context variables are prefixed with a dollar sign in diagrams, to differentiate them from constants.

## `CountDecimate`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` that returns every *n*-th input event (starting with the first). The value *n* is called the **decimation interval**. However, a mode can be specified in order to output the *n*-th input event if it is the last event of the trace and it has not been output already. It is represented graphically as:

![CountDecimate](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqYvLaAhMsZ79vtQ%2FCountDecimate.png?generation=1539330850846177\&alt=media)

## `Cumulate`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` that creates a cumulative processor out of a cumulative function. This is simply an instance of `ApplyFunction` whose function is of a specific type (a `CumulativeFunction`). It is represented graphically as:

![Cumulate](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqYz_finc5tSgV4E%2FCumulate.png?generation=1539330857804126\&alt=media)

## `CumulativeFunction`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A special type of `Function` with memory.

## `Deserialize`

![Serialization](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqZ23vz02wkMTaKC%2FPalette-Serialization.png?generation=1539340781246895\&alt=media) A `Processor` that takes structured character strings as its inputs, and turns each of them into Java objects with the corresponding content. It is represented graphically as follows:

![Deserialize](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqZ4oQNvVJAsovMa%2FDeserialize.png?generation=1539330854412885\&alt=media)

*Deserialization* can be used to restore the state of objects previously saved on a persistent medium, or to receive non-primitive data types over a communication medium such as a network. The opposite operation is called *serialization*.

## `Division`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `BinaryFunction` provided by the `Numbers` utility class. It computes the quotient of two numbers. It is represented as:

![Division](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqZ81jrYdDS-Dh6H%2FDivision.png?generation=1539330829828357\&alt=media)

## `EndsWith`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `BinaryFunction` provided by the `Strings` utility class. It receives two strings as arguments, and returns `true` if the former ends with the latter.

![EndsWith](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqZC1qOPfGWndVdK%2FEndsWith.png?generation=1539330833591893\&alt=media)

## `Equals`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Function` that checks for the equality between two objects. It is represented graphically as follows:

![Equals](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqZGOFw4qOHUGf5F%2FEquals.png?generation=1539330836396917\&alt=media)

## `Eventually`

![LTL](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqZIvwmacduV-GVI%2FPalette-LTL.png?generation=1539340771395376\&alt=media) A `Processor` that implements the "eventually" or **F** operator of Linear Temporal Logic. If *p* is an LTL expression, **F** *p* stipulates that *p* should evaluate to `true` on at least one suffix of the current trace. It is represented graphically as:

![Eventually](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqZKXyt75dPuGTTU%2FEventually.png?generation=1539330842795870\&alt=media)

## `Exists`

![FOL](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqZn5vc8n4LGxtCG%2FPalette-FOL.png?generation=1539330850849337\&alt=media) A `Function` that acts as an existential quantifier in first-order logic. It is represented as:

![Exists](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqZOuNowRzXN4crp%2FExists.png?generation=1539330854457241\&alt=media)

There is also a variant that uses an auxiliary function to compute the set of values to quantify over. It is represented as:

![ExistsFunction](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqZQbvRD7I5JmAGF%2FExistsFunction.png?generation=1539330832438417\&alt=media)

## `ExpandAsColumns`

![Tuples](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqZSQ1BNytIUoCoV%2FPalette-Tuples.png?generation=1539340759256555\&alt=media) A `Function` that transforms a tuple by replacing two key-value pairs by a single new key-value pair. The new pair is created by taking the value of a column as the key, and the value of another column as the value. It is represented as:

![ExpandAsColumns](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqZU9U_8lF5GKF3k%2FExpandAsColumns.png?generation=1539330850147875\&alt=media)

## `Explode`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A 1:*m* `Function` provided by the `Bags` utility class. Given a collection of size *m*, it returns as its *m* outputs the elements of the collection. It can be seen as the opposite of `ToArray`, `ToList` and `ToSet`. The ordering of the arguments is ensured when the input collection is itself ordered. The pictogram used to represent the function depends on the type of collection used for the input, in order to match the pictograph of the inverse function.

![Explode](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqZYJgjtlbujvvZK%2FExplode.png?generation=1539330842549749\&alt=media)

## `Filter`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` that discards events from an input trace based on a selection criterion. The processor takes as input two events simultaneously; it outputs the first if the second is true. Graphically, this processor is represented as:

![Filter](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqZb7L4fODlCeqVr%2FFilter.png?generation=1539330861487144\&alt=media)

## `FilterElements`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A 1:1 `Function` provided by the `Bags` utility class. This function is parameterized by a 1:1 `Function` *f* that must return a Boolean. The `FilterElements` function takes as input a Java `Collection` *c* and returns as its output the collection consisting of only the elements of *c* for which *f*(*c*) returns `true`. It is represented graphically as:

![FilterElements](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqZfjYvbcto3m6EA%2FFilterElements.png?generation=1539330831886616\&alt=media)

## `FindPattern`

A `Processor` that extracts chunks of an input stream based on a regular expression. It is represented graphically as:

![FindPattern](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqZhqnp8u03JpOma%2FFindPattern.png?generation=1539330834543696\&alt=media)

## `FindRegex`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) An `UnaryFunction` provided by the `Strings` utility class. It receives a string *s* as its argument, and returns an *array* of strings, corresponding to all the matches of a given regular expression *exp* on *s*. It is represented as:

![FindRegex](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqZl6G2YzmXWiJRr%2FFindRegex.png?generation=1539330865172680\&alt=media)

## `ForAll`

![FOL](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqZn5vc8n4LGxtCG%2FPalette-FOL.png?generation=1539330850849337\&alt=media) A `Function` that acts as a universal quantifier in first-order logic. It is represented as:

![ForAll](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqZpAraDeGpvtepd%2FForAll.png?generation=1539330828005840\&alt=media)

There is a variant of `ForAll` that uses an auxiliary function to compute the set of values to quantify over. It is represented as:

![ForAllFunction](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqZrfOBXgDQc5AFr%2FForAllFunction.png?generation=1539330836988082\&alt=media)

## `Fork`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` that duplicates a single input stream into two or more output streams. A `Fork` is used when the contents of the same stream must be processed by multiple processors in parallel. It is represented graphically as:

![Fork](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqZvWDikwciIyhD4%2FFork.png?generation=1539330828199558\&alt=media)

## `Freeze`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` that repeatedly outputs the first event it has received. It is represented graphically as:

![Freeze](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqZzu6IFSJ6oPEew%2FFreeze.png?generation=1539330844220117\&alt=media)

## Front

Given *n* streams, the front at position *k* is the tuple made of the event at the *k*-th position in every stream. BeepBeep `Processor`s that have an input *arity* greater than 1 handle events one front at a time; this is called *synchronous processing*.

## `Function`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A computation unit that receives one or more *arguments*, and produces one or more output *values*. Along with `Processor`, this is one of BeepBeep's fundamental classes. Contrary to processors, functions are *stateless* (or history-independent): the same inputs must always produce the same outputs.

Functions are represented graphically as rounded rectangles, with a pictogram describing the computation they perform, such as this:

![Function](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFq_2k5uYL8gFTB0F%2FFunction.png?generation=1539330851360829\&alt=media)

A function with an input arity of *m* and an output arity of *n* is often referred to as an *m*:*n* function.

## `FunctionTransition`

![FSM](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqe8EURRv803CB8z%2FPalette-FSM.png?generation=1539330861440932\&alt=media) A `Transition` of a `MooreMachine` whose firing conditions is determined by evaluating a function *f* on the incoming event front. It is represented as:

![FunctionTransition](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFq_6-qBVSBu5wjAx%2FFunctionTransition.png?generation=1539330849183954\&alt=media)

## `FunctionTree`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Function` object representing the composition of multiple functions together to form a "compound" function. A function tree has a *root*, which consists of an *m*:*n* function. This function is connected to *n* children, which can be functions or function trees themselves. The diagram below depicts a function tree that composes multiplication and addition to form a more complex function of two arguments.

![FunctionTree](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFq_A8NL0xKqOEd72%2FFunctionTree.png?generation=1539330865579378\&alt=media)

## `Get`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `UnaryFunction` provided by the `Maps` utility class; it is parameterized by a key *k*. Given a `Map` *m* as its input, it retrieves the value associated to *k* in *m*. It is represented graphically as:

![Get](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFq_EEa67egK3XBZm%2FGet.png?generation=1539330872396303\&alt=media)

## `GetSize`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A 1:1 `Function` provided by the `Bags` utility class. This function takes as input a Java `Collection` *c* and returns as its output the number of elements in that collection. It is represented graphically as:

![GetSize](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFq_IuqDMvomdBE2L%2FGetSize.png?generation=1539330857341981\&alt=media)

## `GetWidgetValue`

![Widgets](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqe0_PiDsN2vF4lV%2FPalette-Widgets.png?generation=1539340767853636\&alt=media) A `Function` that takes a Swing component as input, and returns the current "value" of this component. It is represented graphically as:

![GetWidgetValue](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFq_MJs3-53C1BbcC%2FGetWidgetValue.png?generation=1539330834024954\&alt=media)

## `Globally`

![LTL](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqZIvwmacduV-GVI%2FPalette-LTL.png?generation=1539340771395376\&alt=media) A `Processor` that implements the "globally" or **G** operator of Linear Temporal Logic. If *p* is an LTL expression, **G** *p* stipulates that *p* should evaluate to `true` on every suffix of the current trace. It is represented graphically as:

![Globally](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFq_QKVdHIo8fmU9U%2FGlobally.png?generation=1539330828701118\&alt=media)

## `GroupProcessor`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` that encapsulates a chain of processors as if it were a single object. It is represented as follows:

![GroupProcessor](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFq_UmVbSNO1Tgmqq%2FGroupProcessor.png?generation=1539330836421220\&alt=media)

To create a `GroupProcessor`, one must first instantiate and connect the processors to be encapsulated. Each processor must then be added to the group through a method called `add`. Finally, the endpoints of the chain must be associated to the inputs and outputs of the group. From then on, the processor can be moved around, connected and duplicated as if it were a single processor.

In a graphical representation of a `GroupProcessor`, the processor chain inside the group can also be drawn.

## `HttpGet`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Source` that reads chunks of data from an URL, using an HTTP request. These chunks are returned as events in the form of strings. It is represented as:

![HttpGet](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFq_YIpGqHPZR0mId%2FHttpGet.png?generation=1539330838181531\&alt=media)

## `IdentityFunction`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Function` that returns its input for its output. It is represented as follows:

![IdentityFunction](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFq_bi48YwkQitcBl%2FIdentityFunction.png?generation=1539330828694650\&alt=media)

The actual colour of the oval depends on the type of events that the function relays.

## `IfThenElse`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A 3:1 `Function` that acts as an if-then-else. If its first input is true, it returns its second input; otherwise it returns its third input. It is represented as follows:

![IfThenElse](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFq_fubqCuW9eL08j%2FIfThenElse.png?generation=1539330833089411\&alt=media)

## `Implies`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `BinaryFunction` provided by the `Booleans` utility class. It computes the logical implication of its two Boolean arguments, and is represented graphically as:

![Implies](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFq_jDfFEBzD7el0U%2FImplies.png?generation=1539330859511601\&alt=media)

## `Insert`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` that inserts an event a certain number of times before letting the input events through. This processor can be used to shift events of an input trace forward, by padding the beginning of the trace with some dummy element. It is represented graphically as:

![Insert](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFq_n4MS82BAl0Oan%2FInsert.png?generation=1539330844817174\&alt=media)

## `IsEven`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) An `UnaryFunction` provided by the `Numbers` utility class. It returns the Boolean value `true` if and only if its argument is an even number. It is represented as:

![IsEven](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFq_rEOhkxJSRMAdu%2FIsEven.png?generation=1539330843110889\&alt=media)

## `IsGreaterOrEqual`, `IsGreaterThan`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) Two `BinaryFunction`s provided by the `Numbers` utility class. They return the Boolean value `true` if their first argument is greater than (or equal to) the second argument. They are represented as:

![IsGreaterThan](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFq_vJ1jBcGixmAy-%2FIsGreaterThan.png?generation=1539330867146721\&alt=media)

## `IsLessOrEqual`, `IsLessThan`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) Two `BinaryFunction`s provided by the `Numbers` utility class. They return the Boolean value `true` if their first argument is less than (or equal to) the second argument. They are represented as:

![IsLessThan](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFq_zAzk4m3xAwtt8%2FIsLessThan.png?generation=1539330852083482\&alt=media)

## `IsSubsetOrEqual`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `BinaryFunction` that receives two sets as arguments, and returns `true` if the first is a subset of the second. It is represented as:

![IsSubsetOrEqual](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqa2lObUDOyl4Cea%2FIsSubsetOrEqual.png?generation=1539330857341767\&alt=media)

## `JdbcSource`

![JDBC](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LP_ypi4bSfe9ynLT4RS%2F-LP_ysGjDAiSt15HZnWD%2FPalette-JDBC.png?generation=1540383085509916\&alt=media) A `Source` object that executes an SQL query on a JDBC connection, and returns the result as a sequence of tuples. It is represented graphically as:

![JdbcSource](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqa4HpuyU51IU1CY%2FJdbcSource.png?generation=1539330861012333\&alt=media)

## `JPathFunction`

![JSON](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqaAYwHNclnHrs69%2FPalette-JSON.png?generation=1539340765710694\&alt=media) A 1:1 `Function` that receives a `JsonElement` as input, and returns a portion of this element as its output. The portion to extract is called a *path expression*, and corresponds to a specific traversal in the input object. The function is represented graphically as:

![JPathFunction](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqa8C6EsUhbX2OAw%2FJPathFunction.png?generation=1539330892954943\&alt=media)

## `JsonElement`

![JSON](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqaAYwHNclnHrs69%2FPalette-JSON.png?generation=1539340765710694\&alt=media) An object representing a part of a JSON document. Specific types of JSON elements are `JsonBoolean`, `JsonList`, `JsonMap`, `JsonNull`, `JsonNumber`, and `JsonString`.

## `KeepLast`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` that returns only the very last event of its input stream, and discards all the previous ones. It is represented graphically as:

![KeepLast](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqaEbieV5vTYl-ha%2FKeepLast.png?generation=1539330853284424\&alt=media)

## `Limit`

![Signal](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqaGRP4hKS7OjgQ_%2FPalette-Signal.png?generation=1539340763769780\&alt=media) A 1:1 `Processor` that receives a stream of numerical values; if the processor receives a non-zero value, it outputs this value, but will turn the *k* following ones into 0, whether they are null or not. Graphically, this processor is represented as:

![Limit](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqaIHNM8bWLiGG5v%2FLimit.png?generation=1539330865189387\&alt=media)

## `ListenerSource`

![Widgets](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqe0_PiDsN2vF4lV%2FPalette-Widgets.png?generation=1539340767853636\&alt=media) A `Source` processor that wraps around a Swing component, and pushes `ActionEvent`s or `ChangeEvent`s when user actions are performed on the component. It is represented as a box illustrating the widget that is being wrapped, such as follows:

![ListenerSource](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqaM-AhkEkqtiXT8%2FListenerSource.png?generation=1539330837001518\&alt=media)

## `Lists`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A container class for functions and processors applying to ordered collections (`List`s) and arrays. Among the processors and functions provided by `Lists` are: `Explode`, `Pack`, `TimePack`, and `Unpack`.

## `Maps`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A container class for functions and processors applying to Java `Map`s, i.e. associative key-value arrays. Among the processors and functions provided by `Maps` are: `ArrayPutInto`, `Get`, `PutInto`, and `Values`.

## `Matches`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `BinaryFunction` provided by the `Strings` utility class. It receives two strings as its arguments, and returns the Boolean value `true` if the first matches the regular expression defined in the second. It is represented as:

![Matches](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqaUVuTlLc810Qf5%2FMatches.png?generation=1539330853357682\&alt=media)

## `Maximum`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `BinaryFunction` provided by the `Numbers` utility class. It returns the maximum of its two arguments. It is represented as:

![Maximum](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqaY-lAvcAExg6ky%2FMaximum.png?generation=1539330847068114\&alt=media)

## `Minimum`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `BinaryFunction` provided by the `Numbers` utility class. It returns the minimum of its two arguments. It is represented as:

![Minimum](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqabJWLqF5NJwUlI%2FMinimum.png?generation=1539330864205482\&alt=media)

## `MooreMachine`

![FSM](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqe8EURRv803CB8z%2FPalette-FSM.png?generation=1539330861440932\&alt=media) A `Processor` that receives an event stream and which, upon each input event, updates its internal state according to a deterministic finite state machine. Each state can be associated with an event to output, corresponding to the formal definition of a Moore machine in theoretical computer science. The `MooreMachine` is depicted by the graph of the FSM it implements; if the graph is too cumbersome, a generic box can be used instead:

![MooreMachine](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqaftj2GSByvrgUw%2FMooreMachine.png?generation=1539330885542558\&alt=media)

## `Multiplex`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` that merges the contents of multiple streams into a single stream. It is an *m*:1 processor that outputs an event as soon as one is available on one of its input pipes. It is represented graphically as:

![Multiplex](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqajWnAHRoxiQDOr%2FMultiplex.png?generation=1539330864612834\&alt=media)

## `Multiplication`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `BinaryFunction` provided by the `Numbers` utility class. It computes the product of two numbers. It is represented as:

![Multiplication](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqan6P9Y7hQTSXqY%2FMultiplication.png?generation=1539330856104329\&alt=media)

## `Multiset`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Set` that preserves the multiplicity of its elements.

## `Next`

![LTL](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqZIvwmacduV-GVI%2FPalette-LTL.png?generation=1539340771395376\&alt=media) A `Processor` that implements the "next" or **X** operator of Linear Temporal Logic. If *p* is an LTL expression, **X** *p* stipulates that *p* should evaluate to `true` on the suffix of the current trace starting at the next event. It is represented graphically as:

![Next](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqatfNueFig6y3S1%2FNext.png?generation=1539330865511681\&alt=media)

## `Not`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) An `UnaryFunction` provided by the `Booleans` utility class. It computes the logical negation of its Boolean argument, and is represented graphically as:

![Not](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqaxZNS1kHZXROJb%2FNot.png?generation=1539330837992860\&alt=media)

## `NumberCast`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) An `UnaryFunction` provided by the `Numbers` utility class. It attempts to convert an arbitrary Java `Object` into a number. It is represented as:

![NumberCast](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqb0bY85a26ZC-yw%2FNumberCast.png?generation=1539330866600655\&alt=media)

## `Numbers`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A container class for functions applying to Java `Number`s. Among the functions provided by `Numbers` are: `AbsoluteValue`, `Addition`, `Division`, `IsEven`, `IsGreaterOrEqual`, `IsGreaterThan`, `IsLessOrEqual`, `IsLessThan`, `Maximum`, `Minimum`, `Multiplication`, `NumberCast`, `Power`, `Signum`, `SquareRoot`, and `Subtraction`.

## `NthElement`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) An `UnaryFunction` that returns the *n*-th element of an ordered collection (array or list). It is represented graphically as:

![NthElement](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqb64EKmzfN_f-b3%2FNthElement.png?generation=1539330859412131\&alt=media)

## `Or`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `BinaryFunction` provided by the `Booleans` utility class. It computes the logical disjunction of its two Boolean arguments, and is represented graphically as:

![Or](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqbApos_vZ5_uWrn%2FOr.png?generation=1539330865997085\&alt=media)

## `Pack`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` provided by the `Lists` utility class. It accumulates events from a first input pipe, and sends them in a burst into a list based on the Boolean value received on its second input pipe. A value of `true` triggers the output of a list, while a value of `false` accumulates the event into the existing list. This processor is represented graphically as follows:

![Pack](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqbET2U9U9l-URtW%2FPack.png?generation=1539330865781026\&alt=media)

The opposite of `Pack` in `Unpack`. See also `TimePack`.

## `ParseJson`

![JSON](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqaAYwHNclnHrs69%2FPalette-JSON.png?generation=1539340765710694\&alt=media) A `Function` that turns a character string into a structured object called a `JsonElement`. The function is represented graphically as:

![ParseJson](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqbImOs1sp3sB0JJ%2FParseJson.png?generation=1539330845903023\&alt=media)

## `ParseXml`

![XML](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqbKG8kNI_YIugat%2FPalette-XML.png?generation=1539340780981258\&alt=media) A `Function` that turns a character string into a structured object called an `XmlElement`. The function is represented graphically as:

![ParseXml](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqbMx80sZsdw86KA%2FParseXml.png?generation=1539330835839648\&alt=media)

## `Passthrough`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` object that lets every input event through as its output. This processor can be used as a placeholder when a piece of code needs to be passed a `Processor` object, but that in some cases, no processing on the events is necessary. Graphically, this processor is represented as:

![Passthrough](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqbQMJrM6_M4RPuj%2FPassthrough.png?generation=1539330853525133\&alt=media)

## `PeakFinder`

![Signal](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqaGRP4hKS7OjgQ_%2FPalette-Signal.png?generation=1539340763769780\&alt=media) A 1:1 `Processor` object receives as input a stream of numerical values, and identifies the "peaks" (sudden increases) in that signal. It outputs the value 0 if no peak is detected at the current input position, and otherwise, the height of the detected peak. Graphically, this processor is represented as:

![PeakFinder](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqbUVcpeuBqJRuyL%2FPeakFinder.png?generation=1539330859215455\&alt=media)

The *Signal* palette implements two variants of `PeakFinder` called `PeakFinderLocalMaximum` and `PeakFinderTravelRise`.

## `Persist`

![Signal](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqaGRP4hKS7OjgQ_%2FPalette-Signal.png?generation=1539340763769780\&alt=media) A 1:1 `Processor` that receives a stream of numerical values; when a processor receives a non-zero value, it outputs it for the next *k* events, unless a subsequent input value is greater (in which case this new value is output for the next *k* events). Graphically, this processor is represented as:

![Persist](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqbYP2CxxgWqz2mR%2FPersist.png?generation=1539330866098692\&alt=media)

## `PlateauFinder`

![Signal](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqaGRP4hKS7OjgQ_%2FPalette-Signal.png?generation=1539340763769780\&alt=media) A 1:1 `Processor` object receives as input a stream of numerical values, and identifies the "plateaus" (successive events with similar values) in that signal. It outputs the value 0 if no plateau is detected at the current input position, and otherwise, the height of the detected plateau. Graphically, this processor is represented as:

![PlateauFinder](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqbbYngQ-FX8kXj4%2FPlateauFinder.png?generation=1539330848382465\&alt=media)

## `Power`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `BinaryFunction` provided by the `Numbers` utility class. It computes the first argument, elevated to the power of the second. It is represented as:

![Power](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqbf-BmdB3E0VozW%2FPower.png?generation=1539330866089095\&alt=media)

## `Prefix`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` that returns the first n input events and discards the following ones. It is represented graphically as:

![Prefix](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqbjHvTtf9HJyWkS%2FPrefix.png?generation=1539330854544107\&alt=media)

## `Print`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` that sends its input events to a Java `PrintStream` (such as the standard output). This processor takes whatever event it receives (i.e. any Java `Object`), calls its {@link Object#toString() toString()} method, and pushes the resulting output to a print stream. Graphically, it is represented as:

![Print](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqbnxuhsKz1opvls%2FPrint.png?generation=1539330839129970\&alt=media)

## `Processor`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A processing unit that receives zero or more input streams, and produces zero or more output streams. The `Processor` is the fundamental class where all stream computation occurs. All of BeepBeep's processors are descendants of this class. A processor is depicted graphically as a "box", with "pipes" representing its input and output streams.

![Processor](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqbr63q78lpFaOI6%2FProcessor-generic.png?generation=1539330859751111\&alt=media)

This class itself is abstract; nevertheless, it provides important methods for handling input/output event queues, connecting processors together, etc. However, if you write your own processor, you will most likely want to inherit from its child, `SynchronousProcessor`, which does some additional work. The `Processor` class does not assume anything about the type of events being input or output. All its input and output queues are therefore declared as containing instances of `Object`, Java's most generic type.

## `Product`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A 2:1 `Function` provided by the `Bags` utility class. This function takes as input two Java `Collection`, *c1* and *c2*, and returns as its output a set of arrays of size 2, corresponding to the Cartesian product of *c1* and *c2*. It is represented graphically as:

![Product](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqbv2S0KnbKADLLG%2FProduct.png?generation=1539330860023730\&alt=media)

## `Pullable`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) An object that queries events on one of a processor's outputs. For a processor with an output arity *n*, there exists *n* distinct pullables, namely one for each output trace. Every pullable works roughly like a classical `Iterator`: it is possible to check whether new output events are available, and get one new output event. However, contrarily to iterators, `Pullable`s have two versions of each method: a *soft* and a *hard* version. The opposite of `Pullable`s are `Pushable`s --objects that allow users to feed input events to processors. Graphically, a `Pullable` is represented by a pipe connected to a processor, with an outward pointing triangle:

![Pullable](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqbzy0CanVMa7mzw%2FPullable.png?generation=1539330867238159\&alt=media)

## Pull mode

One of the two operating modes of a chain of processors. In pull mode, a user or an application obtains references to the `Pullable` objects of the downstream processors of the chain, and calls their `pull()` method to ask for new output events. When using a chain of processors in pull mode, the chain must be closed at its inputs. The opposite mode is called *push mode*.

## `Pump`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` that repeatedly pulls its input, and pushes the resulting events to its output. The `Pump` is a way to bridge an upstream part of a processor chain that works in *pull* mode, to a downstream part that operates in *push* mode.

Graphically, this processor is represented as:

![Pump](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqc2UzGw2aaSj1l9%2FPump.png?generation=1539330858933624\&alt=media)

The repeated pulling of events from its input is started by calling this processor's `#start()` method. In the background, this will instantiate a new thread, which will endlessly call pull() on whatever input is connected to the pump, and then call push() on whatever input is connected to it.

The opposite of the `Pump` is the `Tank`.

## `Pushable`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) An object that gives events to some of a processor's input. Interface `Pushable` is the opposite of `Pullable`: rather than querying events form a processor's output (i.e. "pulling"), it gives events to a processor's input. This has for effect of triggering the processor's computation and "pushing" results (if any) to the processor's output. If a processor is of input arity *n*, there exist *n* distinct `Pullable`s: one for each input pipe. Graphically, a `Pushable` is represented by a pipe connected to a processor, with an inward pointing triangle:

![Pushable](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqc6vXBshWZLH4yB%2FPushable.png?generation=1539330865822811\&alt=media)

## Push mode

One of the two operating modes of a chain of processors. In push mode, a user or an application obtains references to the `Pushable` objects of the upstream processors of the chain, and calls their `push()` method to feed new input events. When using a chain of processors in push mode, the chain must be closed at its outputs. The opposite mode is called *pull mode*.

## `PutInto` (`Maps`)

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` provided by the `Maps` utility class. It updates a map by putting key-value pairs into it. The processor takes two input streams; the first contains the key, and the second contains the value that will be put into the array. Upon each input front, it repeatedly outputs a reference to the same internal `Map` object, updated accordingly. The processor is represented graphically as:

![PutInto](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqcAEBB6zEv5IidZ%2FPutInto.png?generation=1539330852044160\&alt=media)

See also `ArrayPutInto`.

## `PutInto` (`Sets`)

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` provided by the `Sets` utility class. Updates a set by putting the elements it receives into it. Upon each input event, it repeatedly outputs a reference to the same internal `Set` object, updated accordingly. The processor is represented graphically as:

![SetPutInto](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqcEaZN-JwuYwg6l%2FSetPutInto.png?generation=1539330865165579\&alt=media)

See also `PutIntoNew`.

## `PutIntoNew` (`Sets`)

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` provided by the `Sets` utility class. Updates a set by putting the elements it receives into it. Upon each input event, it creates a new instance of `Set` and adds to it all the events received so far; it then outputs a reference to this new set. The processor is represented graphically as:

![SetPutIntoNew](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqcIpLRb0sjs-3Gl%2FSetPutIntoNew.png?generation=1539330861978415\&alt=media)

See also `PutInto` (`Sets`).

## `QueueSink`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Sink` that accumulates events into queues, one for each input pipe. It is represented graphically as:

![QueueSink](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqcM6PTsQSQ1-3vV%2FQueueSink.png?generation=1539330858372551\&alt=media)

## `QueueSource`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Source` whose input is a queue of objects. One gives the `QueueSource` a list of events, and that source sends these events as its input one by one. When reaching the end of the list, the source returns to the beginning and keeps feeding events from the list endlessly. The `QueueSource` is represented graphically as:

![QueueSource](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqcQAeX15EL4-tkC%2FQueueSource.png?generation=1539330857280602\&alt=media)

## `RaiseArity`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Function` that raises the arity of another function. Given an *m*:*n* function *f*, an instance of `RaiseArity` *r* makes *f* behave like an *m'*:*n* function, with *m'* > *m*. The extra arguments given to *r* are simply ignored. It is represented as:

![RaiseArity](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqcUoUQcRXmoJbz6%2FRaiseArity.png?generation=1539330846121627\&alt=media)

## `Randomize`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A *n*:*n* `Processor` that turns an arbitrary input event front into an output front made of randomly selected numerical values. The interval in which values are selected can be specified. It is represented graphically as:

![Randomize](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqcYmkNno3dsDp9c%2FRandomize.png?generation=1539330834598091\&alt=media)

## `ReadInputStream`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Source` that reads chunks of bytes from a Java `InputStream`. It is represented graphically as follows:

![StreamReader](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqcbGnUnjwvrm_Z_%2FStreamReader.png?generation=1539330846502932\&alt=media)

## `ReadLines`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A Source that reads entire text lines from a Java `InputStream`. It is represented graphically as:

![ReadLines](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqcfWRNDBOjLaJTq%2FReadLines.png?generation=1539330839123773\&alt=media)

## `ReadStringStream`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A variant of `ReadInputStream` that converts the byte chunks into character strings.

## `RunOn`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` provided by the `Bags` utility class. This processor is parameterized by another processor *P*. It receives as input a stream of collections. On each individual collection *c*, it resets *P*, feeds each element of *c* on *P*, and retrieves the last event output by *P* on that stream; this is the event is the event output by `RunOn` on *c*. It is represented graphically as:

![RunOn](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqcltXDvfVYP1QLR%2FRunOn.png?generation=1539330861974179\&alt=media)

If the collection *c* is unordered and *P* is sensitive to event ordering, the output of `RunOn` on this collection may not always be the same.

## `Serialize`

![Serialization](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqZ23vz02wkMTaKC%2FPalette-Serialization.png?generation=1539340781246895\&alt=media) A `Processor` that takes arbitrary objects as its inputs, and turns each of them into a structured character string depicting their content. It is represented graphically as follows:

![Serialize](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqcpLCqCSA8Aw6hj%2FSerialize.png?generation=1539330844826784\&alt=media)

*Serialization* can be used to store the state of objects on a persistent medium, or to transmit non-primitive data types over a communication medium such as a network. The opposite operation is called *deserialization*.

## `Sets`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A container class for functions and processors applying to Java `Set`s and their descendents. Among the processors and functions provided by `Sets` are: `IsSubsetOrEqual`, `PutInto`, `PutIntoNew`, and `SetUpdateProcessor`.

## `Signum`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) An `UnaryFunction` provided by the `Numbers` utility class. It returns -1 if the argument is negative, +1 if it is positive, and 0 if the argument is the number 0. It is represented as:

![Signum](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqcv7oDUKPBF5RzC%2FSignum.png?generation=1539330865639592\&alt=media)

## `SynchronousProcessor`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` that performs a computation on input events to produce output events. This is the direct descendant of `Processor`, and probably the one you'll want to inherit from when creating your own processors. While `Processor` takes care of input and output queues, `SynchronousProcessor` also implements `Pullable`s and `Pushable`s. These take care of collecting input events, waiting until one new event is received from all input traces before triggering the computation, pulling and buffering events from all outputs when either of the `Pullable`s is being called, etc. The only thing that is left undefined is what to do when new input events have been received from all input traces. This is the task of abstract method `compute()`, which descendants of this class must implement.

## `Sink`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` with an output *arity* of zero. It is used to close processor chains in *push mode*.

## `SinkLast`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A variant of `QueueSink` with a queue of size 1. A `SinkLast` remembers only the last event sent to it.

## `Slice`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` that separates the events from an input stream into multiple "sub-streams". A function *f*, called the *slicing function*, dispatches to a copy of *P* an input event *e* according to the value of *f*(*e*) (there is one copy of *P* for each possible output value of *f*). The `Slice` processor returns a Java `Map` containing as keys the value of *f*(*e*), and as value, the last event returned by the processor *P* associated to *f*(*e*). It is illustrated as:

![Slice](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqd4yzHGJ7-jOVwx%2FSlice.png?generation=1539330855974868\&alt=media)

## `Smooth`

![Signal](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqaGRP4hKS7OjgQ_%2FPalette-Signal.png?generation=1539340763769780\&alt=media) A `Processor` that smoothes a stream of numbers by replacing a value by an average over a window of events. It is illustrated as:

![Smooth](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqd8tDpVcOG_vZvt%2FSmooth.png?generation=1539330855109545\&alt=media)

## `Source`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` with an input *arity* of zero. It is used to close processor chains in *pull mode*.

## `Splice`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Source` that joins multiple sources as a single one. The splice processor is given multiple sources. It pulls events from the first one until it does not yield any new event. It then starts pulling events from the second one, and so on. It is illustrated as:

![Splice](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqdEXJHmdlxAqJp8%2FSplice.png?generation=1539330864952942\&alt=media)

## `SplitString`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) An `UnaryFunction` provided by the `Strings` utility class. It receives as string as its input, and returns an *array* of strings, split according to a given character separator. It is represented as:

![SplitString](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqdIS-dkVBX24Y3I%2FSplitString.png?generation=1539330859430727\&alt=media)

The comma in the figure is to be replaced by the actual character used to separate the input string.

## `SquareRoot`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) An `UnaryFunction` provided by the `Numbers` utility class. It computes the square root of its argument. It is represented as:

![SquareRoot](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqdMRe8QtcCgp6Ji%2FSquareRoot.png?generation=1539330845319147\&alt=media)

## `StartsWith`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `BinaryFunction` provided by the `Strings` utility class. It receives two strings as its arguments, and returns the Boolean value `true` if the first string starts with the second. It is represented as:

![StartsWith](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqdQSmX6nFHhe0rU%2FStartsWith.png?generation=1539330856118211\&alt=media)

## `StreamVariable`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Function` standing for the *i*-th stream given as input to a processor. A `StreamVariable` can be given as an argument to a `FunctionTree`. It is represented as follows:

![StreamVariable](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqdUvVpiw1DR7_Ek%2FStreamVariable.png?generation=1539330866701593\&alt=media)

The number inside the diamond represents the stream number. By convention, stream numbers start at 1 in diagrams.

## `Strings`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A container class for functions and processors applying to Java `String`s. Among the processors and functions provided by `Sets` are: `Concat`, `Contains`, `EndsWith`, `FindRegex`, `Matches`, `SplitString`, `StartsWith` and `ToString`.

## `Stutter`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` that repeats each input event in its output a fixed number of times (*k*; see also `VariableStutter`). It is represented graphically as:

![Stutter](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqd_YmZQBHX36De1%2FStutter.png?generation=1539330860653388\&alt=media)

## `Subtraction`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `BinaryFunction` provided by the `Numbers` utility class. It computes the difference of two numbers. It is represented as:

![Subtraction](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqdd8cm2112ddMmD%2FSubtraction.png?generation=1539330865413534\&alt=media)

## `Tank`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` that accumulates pushed events into a queue until they are pulled. The Tank is a way to bridge an upstream part of a processor chain that works in *push* mode, to a downstream part that operates in *pull* mode.

Graphically, this processor is represented as:

![Tank](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqdhIpwoB2rVTiG8%2FTank.png?generation=1539330861700118\&alt=media)

The opposite of the tank is the `Pump`.

## `TankLast`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A variant of `Tank` which, when pulled, creates an output event based on the last event received.

## `Threshold`

![Signal](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqaGRP4hKS7OjgQ_%2FPalette-Signal.png?generation=1539340763769780\&alt=media) A 1:1 `Processor` that receives a stream of numerical values; the processor outputs an event if its value is above some threshold value *k*; otherwise it replaces it by 0. Graphically, this processor is represented as:

![Threshold](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqdnLO1ZZvNxI2qh%2FThreshold.png?generation=1539330865964375\&alt=media)

## `TimeDecimate`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` which, after returning an input event, discards all others for the next *n* seconds. This processor therefore acts as a rate limiter. It is represented as:

![TimeDecimate](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqdrDnt0-2mtMjyP%2FTimeDecimate.png?generation=1539330861534220\&alt=media)

Note that this processor uses `System.currentTimeMillis()` as its clock. Moreover, a mode can be specified in order to output the last input event of the trace if it has not been output already.

## `TimePack`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` provided by the `Lists` utility class. It accumulates events from a first input pipe, and sends them in a burst into a list at predefined time intervals. This processor is represented graphically as follows:

![TimePack](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqdvV5V5SdhtyM8q%2FTimePack.png?generation=1539330863686139\&alt=media)

The opposite of `TimePack` in `Unpack`. See also `Pack`.

## `ToArray`, `ToList`, `ToSet`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) Three *m*:1 `Function`s provided by the `Bags` utility class. Their input arity is defined by parameter *m*. They turn their *m* arguments into a Java array, list or set of size *m*. In the case of arrays and lists, the ordering of the arguments is preserved: the *i*-th argument of the function is placed at the *i*-th position in the output collection. The following picture shows the graphical representation of each of these functions:

![ToArray, ToList, ToSet](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqdzccOSNRWX0tRO%2FToArrayListSet.png?generation=1539330862677386\&alt=media)

## `ToImageIcon`

![Widgets](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqe0_PiDsN2vF4lV%2FPalette-Widgets.png?generation=1539340767853636\&alt=media) An `UnaryFunction` that converts an array of bytes containing an image, into a Swing `ImageIcon`. It is represented as:

![ToImageIcon](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqe2VgidNXFjGlEe%2FToImageIcon.png?generation=1539330865960046\&alt=media)

## `ToString`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) An `UnaryFunction` provided by the `Strings` utility class. It attempts to convert an arbitrary Java `Object` into a `String`; this is done by calling the object's `toString` method. It is represented as:

![ToString](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqe6BnKymPqGx0F_%2FToString.png?generation=1539330865189569\&alt=media)

## `Transition`

![FSM](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqe8EURRv803CB8z%2FPalette-FSM.png?generation=1539330861440932\&alt=media) An object used by the `MooreMachine` processor that indicates how the machine can move between its states. It is represented as:

![Transition](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqeAhZ_e4MSqi120%2FTransition.png?generation=1539330860054144\&alt=media)

## `TransitionOtherwise`

![FSM](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqe8EURRv803CB8z%2FPalette-FSM.png?generation=1539330861440932\&alt=media) A `Transition` object used by the `MooreMachine` processor that fires only if none of the other outgoing transitions from the same source state fires first.

![TransitionOtherwise](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqeEdq3rVX2mqB93%2FTransitionOtherwise.png?generation=1539330848657964\&alt=media)

## `Trim`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` that discards the first *n* events of its input stream, and outputs the remaining ones as is. It is represented as:

![Trim](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqeIqN4bUdoybqpJ%2FTrim.png?generation=1539330867781027\&alt=media)

## `Tuple`

![Tuples](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqZSQ1BNytIUoCoV%2FPalette-Tuples.png?generation=1539340759256555\&alt=media) A special type of event defined by BeepBeep's *Tuple* palette, which consists of an associative map between keys and values. Contrary to tuples in relational databases, where values must be scalar (i.e. strings or numbers), the tuples in BeepBeep can have arbitrary Java objects as values (including other tuples).

## `TupleFeeder`

![Tuples](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqZSQ1BNytIUoCoV%2FPalette-Tuples.png?generation=1539340759256555\&alt=media) A `Processor` that converts lines of text into `Tuple`s. It is represented as:

![TupleFeeder](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqeOnicBhg3gyk5-%2FTupleFeeder.png?generation=1539330865284453\&alt=media)

## `TurnInto`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` that turns any input event into a predefined object. It is represented graphically as:

![TurnInto](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqeSMoBK1PLGJ83U%2FTurnInto.png?generation=1539330861486094\&alt=media)

## `UnaryFunction`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Function` object that has an input and output *arity* of exactly 1.

## Uniform (processor)

A `Processor` that produces the same number of output fronts for every input front it receives. Occasionally, the number of output fronts produced is explicitly mentioned: a *k*-uniform processor produces exactly *k* output fronts for every input front.

## `Unpack`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` provided by the `Lists` utility class. It unpacks a list of objects by outputting its contents as separate events. This processor is represented graphically as follows:

![Unpack](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqeYnxjwnj4NkN24%2FUnpack.png?generation=1539330865089761\&alt=media)

The opposite of `Unpack` is `Pack`.

## `Until`

![LTL](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqZIvwmacduV-GVI%2FPalette-LTL.png?generation=1539340771395376\&alt=media) A `Processor` that implements the "until" or **U** operator of Linear Temporal Logic. If *p* and *q* are two streams of Boolean value, *p* **U** *q* stipulates that *q* should evaluate to `true` on some future input front, and that until then, *p* should evaluates to `true` on every input front. It is represented graphically as:

![Until](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqebzr-NYnKH5uFP%2FUntil.png?generation=1539330866169427\&alt=media)

## `Values`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `UnaryFunction` provided by the `Maps` utility class. Given a `Map` *m* as its input, it returns a `Set` made of all the values present in *m*. It is represented graphically as:

![Values](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqefkEHQzwNJp9cE%2FValues.png?generation=1539330856632372\&alt=media)

## `VariableStutter`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A 2:1 `Processor` that repeats each input event coming in its first input pipe a number of times defined by the input event coming into its second input pipe. It is represented graphically as:

![VariableStutter](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqejJE3bOLh_a3fu%2FVariableStutter.png?generation=1539330857343590\&alt=media)

## `Variant`

A special class that can be returned by a call to a processor's `getInputTypesFor` or `getOutputType` methods. The occurrence of such a type in an input or output pipe disables the type checking step that the `Connector` class normally performs before connecting two processors together.

## `Window`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` that applies another processor on a "sliding window" of events. It takes as arguments another processor *P* and a window width *n*. It returns the result of P after processing events 0 to *n*-1... - Then the result of (a new instance of P) that processes events 1 to *n*, and so on. It is represented graphically as:

![Window](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqenV1bCjVSBLhZm%2FWindow.png?generation=1539330857860965\&alt=media)

## `WindowFunction`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Processor` that applies a function on a "sliding window" of events. It takes a sliding window of *n* successive input events, passes them to the *n*-ary function *f* and outputs the result. It is represented graphically as:

![WindowFunction](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqer56Zc699t4vMR%2FWindowFunction.png?generation=1539330852609525\&alt=media)

## `WriteOutputStream`

![Core](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqcWW5uF3lHZQdHJ%2FPalette-Core.png?generation=1539340771413999\&alt=media) A `Sink` that writes chunks of bytes to a Java `OutputStream`. It is represented graphically as follows:

![WriteOutputStream](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqevJRi8y4MeYDgT%2FWriteOutputStream.png?generation=1539330853879509\&alt=media)

## `XmlElement`

![XML](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqbKG8kNI_YIugat%2FPalette-XML.png?generation=1539340780981258\&alt=media) An object representing an element of an XML document.

## `XPathFunction`

![XML](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObqxHVAWbG4vgQjdmX%2F-LObFqbKG8kNI_YIugat%2FPalette-XML.png?generation=1539340780981258\&alt=media) A 1:1 `Function` that receives an `XmlElement` as input, and returns a portion of this element as its output. The portion to extract is called a *path expression*, and corresponds to a specific traversal in the input object. The function is represented graphically as:

![XPathFunction](https://4184180736-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJTd-3pTuv6lU9EVt3Y%2F-LObFp0fKMXAw239S3Kj%2F-LObFqf0KA3RRvoLr-6v%2FXPathFunction.png?generation=1539330864274234\&alt=media)
