java.lang.Object
io.jstach.jstachio.Output.StringOutput
- All Implemented Interfaces:
Output<RuntimeException>
String Builder based output.
- Author:
- agentgt
-
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.The buffer that has been wrapped.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.jstach.jstachio.Output
toAppendable
-
Constructor Details
-
StringOutput
Create using supplied StringBuilder.- Parameters:
buffer- never null.
-
-
Method Details
-
append
Description copied from interface:OutputAnalogous toAppendable.append(CharSequence).- Specified by:
appendin interfaceOutput<RuntimeException>- Parameters:
s- unlike appendable always non null.
-
append
Description copied from interface:OutputAnalogous toAppendable.append(CharSequence)which by default treats the String as a CharSequence.- Specified by:
appendin interfaceOutput<RuntimeException>- Parameters:
s- unlike appendable always non null.
-
append
Description copied from interface:OutputAnalogous toAppendable.append(CharSequence, int, int).- Specified by:
appendin interfaceOutput<RuntimeException>- Parameters:
csq- Unlike appendable never null.start- start inclusiveend- end exclusive
-
append
Description copied from interface:OutputAppends a character to an appendable.- Specified by:
appendin interfaceOutput<RuntimeException>- Parameters:
c- character
-
toString
-
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.
- Specified by:
appendin interfaceOutput<RuntimeException>- Parameters:
b- boolean- Throws:
RuntimeException
-
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.
- Specified by:
appendin interfaceOutput<RuntimeException>- Parameters:
d- double- Throws:
RuntimeException
-
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.
- Specified by:
appendin interfaceOutput<RuntimeException>- Parameters:
i- int- Throws:
RuntimeException
-
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.
- Specified by:
appendin interfaceOutput<RuntimeException>- Parameters:
l- long- Throws:
RuntimeException
-
append
Description copied from interface:OutputWrite a short by usingString.valueOf(int)- Specified by:
appendin interfaceOutput<RuntimeException>- Parameters:
s- short- Throws:
RuntimeException
-
getBuffer
The buffer that has been wrapped.- Returns:
- the wrapped builder
-