T
- The data format that this upcaster uses to represent the data@FunctionalInterface public interface Upcaster<T>
Modifier and Type | Method and Description |
---|---|
Stream<T> |
upcast(Stream<T> intermediateRepresentations)
Apply this upcaster to a stream of
intermediateRepresentations and return the altered stream. |
Stream<T> upcast(Stream<T> intermediateRepresentations)
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.
intermediateRepresentations
- The input stream of representations of objectsCopyright © 2010–2024. All rights reserved.