@PSOperatorWrapper public class Callbacks extends java.lang.Object
| Constructor and Description |
|---|
Callbacks() |
| Modifier and Type | Method and Description |
|---|---|
static PStreamAction |
forEach(Function<Item,java.lang.Void> itemCallback)
Callback with each item in the stream.
|
static <TValue> PStreamAction |
forEachField(java.lang.String fieldToSelect,
Function<TValue,java.lang.Void> fieldValueCallback)
Callback with the field value for each item in the stream.
|
static <TValue> PStreamAction |
ifFieldPresent(java.lang.String fieldToSelect,
Function<TValue,java.lang.Void> fieldValueCallback)
Callback with the first present field value in the stream.
|
static PStreamAction |
ifPresent(Function<Item,java.lang.Void> itemCallback)
Callback with the first item in the stream.
|
static PStreamAction |
onChange(Function<Item,java.lang.Void> itemCallback)
Callback with the changed items in the stream.
|
static <TValue> PStreamAction |
onFieldChange(java.lang.String fieldToSelect,
Function<TValue,java.lang.Void> fieldValueCallback)
Callback with the changed field value of a given field in the stream.
|
public static PStreamAction forEach(Function<Item,java.lang.Void> itemCallback)
itemCallback - the callback to be invoked for each itempublic static <TValue> PStreamAction forEachField(java.lang.String fieldToSelect, Function<TValue,java.lang.Void> fieldValueCallback)
TValue - the type of field valuefieldToSelect - the field to selectfieldValueCallback - the callback function to be invoked for each field valuepublic static PStreamAction ifPresent(Function<Item,java.lang.Void> itemCallback)
itemCallback - the callback to be invoked with the first item.public static <TValue> PStreamAction ifFieldPresent(java.lang.String fieldToSelect, Function<TValue,java.lang.Void> fieldValueCallback)
TValue - the type of field valuefieldToSelect - the field to selectfieldValueCallback - the callback function to be invoked with the first field valuepublic static PStreamAction onChange(Function<Item,java.lang.Void> itemCallback)
itemCallback - the callback to be invoked with the changed item.public static <TValue> PStreamAction onFieldChange(java.lang.String fieldToSelect, Function<TValue,java.lang.Void> fieldValueCallback)
TValue - the type of field valuefieldToSelect - the field to selectfieldValueCallback - the callback function to be invoked with the changed field value.