Interface ModifiedValueFunction<I,O>
-
- Type Parameters:
I
- the input typeO
- the output type
- All Superinterfaces:
Function<I,O>
- All Known Implementing Classes:
CacheIntermediatePublisher
public interface ModifiedValueFunction<I,O> extends Function<I,O>
This is a special interface that can mark a Function so that a user can know if the actual value will change when the function is applied or not. This way a function can communicate if it is only observing values or modifying them to the invoker. This can allow the invoker in some cases to optimize a given code path knowing that the values are unchanged.It should be noted that "changed" can be different in a given context. For example if the underlying implementation utilized something similar to a
EncodingFunction
the result could be a different object completely but is essentially the same.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isModified()
This method should return true when this function changes the actual values of the Publisher.
-