Enum Class NoOpEventUpcaster
- All Implemented Interfaces:
Serializable,Comparable<NoOpEventUpcaster>,Constable,EventUpcaster,Upcaster<IntermediateEventRepresentation>
Event upcaster that does nothing.
- Since:
- 3.0
- Author:
- Rene de Waele
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionupcast(Stream<IntermediateEventRepresentation> intermediateRepresentations) Apply this upcaster to a stream ofintermediateRepresentationsand return the altered stream.static NoOpEventUpcasterReturns the enum constant of this class with the specified name.static NoOpEventUpcaster[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
Instance of an EventUpcaster that does nothing.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
upcast
public Stream<IntermediateEventRepresentation> upcast(Stream<IntermediateEventRepresentation> intermediateRepresentations) Description copied from interface:UpcasterApply this upcaster to a stream ofintermediateRepresentationsand return the altered stream.To upcast an object an upcaster should apply a mapping function to the input stream (
Stream.map(java.util.function.Function)). To remove an object from the stream the upcaster should filter the input stream (Stream.filter(java.util.function.Predicate)). To split an input object into more than one objects useStream.flatMap(java.util.function.Function).In some cases the upcasting result of an Upcaster may depend on more than one input object. In that case an Upcaster may store state in the method during upcasting or even read ahead in the stream.
- Specified by:
upcastin interfaceUpcaster<IntermediateEventRepresentation>- Parameters:
intermediateRepresentations- The input stream of representations of objects- Returns:
- the output stream of representations after applying the upcast function
-