public enum NoOpEventUpcaster extends Enum<NoOpEventUpcaster> implements EventUpcaster
Enum Constant and Description |
---|
INSTANCE
Instance of an EventUpcaster that does nothing.
|
Modifier and Type | Method and Description |
---|---|
Stream<IntermediateEventRepresentation> |
upcast(Stream<IntermediateEventRepresentation> intermediateRepresentations)
Apply this upcaster to a stream of
intermediateRepresentations and return the altered stream. |
static NoOpEventUpcaster |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NoOpEventUpcaster[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NoOpEventUpcaster INSTANCE
public static NoOpEventUpcaster[] values()
for (NoOpEventUpcaster c : NoOpEventUpcaster.values()) System.out.println(c);
public static NoOpEventUpcaster valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Stream<IntermediateEventRepresentation> upcast(Stream<IntermediateEventRepresentation> intermediateRepresentations)
Upcaster
intermediateRepresentations
and 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 use Stream.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.
upcast
in interface Upcaster<IntermediateEventRepresentation>
intermediateRepresentations
- The input stream of representations of objectsCopyright © 2010–2020. All rights reserved.