-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface CoercionOptimizer
Implements the optimization ofCoercion.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Writeroptimize(Writer out, Encoder encoder)Unwraps a writer to expose any wrapped writer.
-
-
-
Method Detail
-
optimize
Writer optimize(Writer out, Encoder encoder)
Unwraps a writer to expose any wrapped writer. The wrapped writer is only returned when it is write-through, meaning the wrapper doesn't modify the data written, and writes to the wrapped writer immediately (no buffering).- Parameters:
out- the writer to try unwrappingencoder- the encoder being used ornullfor none- Returns:
- The functionally equivalent, but more efficient/direct, writer
or
outwhen nothing to unwrap
-
-