Module io.jstach.jstachio
Package io.jstach.jstachio.output
Class ForwardingOutput<E extends Exception>
java.lang.Object
io.jstach.jstachio.output.ForwardingOutput<E>
- Type Parameters:
E- error throw on any append or write
- All Implemented Interfaces:
Output<E>
- Direct Known Subclasses:
ForwardingEncodedOutput
An encoded output that forwards all calls to a delegate.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jstach.jstachio.Output
Output.CloseableEncodedOutput<E extends Exception>, Output.EncodedOutput<E extends Exception>, Output.StringOutput -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(boolean b) Write a long by usingString.valueOf(long).voidappend(char c) Appends a character to an appendable.voidappend(double d) Write a long by usingString.valueOf(long).voidappend(int i) Write a int by usingString.valueOf(int).voidappend(long l) Write a long by usingString.valueOf(long).voidappend(short s) Write a short by usingString.valueOf(int)voidAnalogous toAppendable.append(CharSequence).voidappend(CharSequence csq, int start, int end) Analogous toAppendable.append(CharSequence, int, int).voidAnalogous toAppendable.append(CharSequence)which by default treats the String as a CharSequence.delegate()The output to forward to.Converts the output to an appendable unless it already is one.
-
Constructor Details
-
ForwardingOutput
protected ForwardingOutput()Do nothing constructor
-
-
Method Details
-
delegate
The output to forward to.- Returns:
- output to forward to.
-
append
Description copied from interface:OutputAnalogous toAppendable.append(CharSequence). -
append
Description copied from interface:OutputWrite a short by usingString.valueOf(int) -
append
Description copied from interface:OutputWrite a int by usingString.valueOf(int).Implementations should override if they want different behavior or able to support appendables that can write the native type.
-
append
Description copied from interface:OutputWrite a long by usingString.valueOf(long).Implementations should override if they want different behavior or able to support appendables that can write the native type.
-
append
Description copied from interface:OutputWrite a long by usingString.valueOf(long).Implementations should override if they want different behavior or able to support appendables that can write the native type.
-
append
Description copied from interface:OutputWrite a long by usingString.valueOf(long).Implementations should override if they want different behavior or able to support appendables that can write the native type.
-
toAppendable
Description copied from interface:OutputConverts the output to an appendable unless it already is one.- Specified by:
toAppendablein interfaceOutput<E extends Exception>- Returns:
- adapted appendable of this output.
-
append
Description copied from interface:OutputAppends a character to an appendable. -
append
Description copied from interface:OutputAnalogous toAppendable.append(CharSequence)which by default treats the String as a CharSequence. -
append
Description copied from interface:OutputAnalogous toAppendable.append(CharSequence, int, int).
-