java.lang.Object
swim.codec.Format
Text format utility functions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic Stringdebug(Object object, OutputSettings settings) Returns the developer-readableDisplaystring for the givemobject, output using the givensettings.static <T> Output<T>static <T> Output<T>Writes the code points of the Java character literal for the givenvaluetooutput.static <T> Output<T>debugDouble(Output<T> output, double value) Writes the code points of the Java numeric literal for the givenvaluetooutput.static <T> Output<T>debugFloat(Output<T> output, float value) Writes the code points of the Java numeric literal for the givenvaluetooutput.static <T> Output<T>Writes the code points of the Java numeric literal for the givenvaluetooutput.static <T> Output<T>Writes the code points of the Java numeric literal for the givenvaluetooutput.static <T> Output<T>debugString(Output<T> output, String value) Writes the code points of the Java string literal for the givenvaluetooutput.static Stringstatic Stringdisplay(Object object, OutputSettings settings) static <T> Output<T>static <T> Output<T>displayDouble(Output<T> output, double value) Writes the code points of the numeric string for the givenvaluetooutput.static <T> Output<T>displayFloat(Output<T> output, float value) Writes the code points of the numeric string for the givenvaluetooutput.static <T> Output<T>displayInt(Output<T> output, int value) Writes the code points of the numeric string for the givenvaluetooutput.static <T> Output<T>displayLong(Output<T> output, long value) Writes the code points of the numeric string for the givenvaluetooutput.static StringReturns the operting system specific string used to separate lines of text.
-
Method Details
-
display
Writes the code points of the human-readableDisplaystring for the givenobjecttooutput. Assumesoutputis a UnicodeOutputwriter with sufficient capacity. Delegates toDisplay.display(Output), ifobjectimplementsDisplay; otherwise writes the result ofObject.toString().- Returns:
- the continuation of the
output.
-
display
Returns the human-readableDisplaystring for the givemobject, output using the givensettings. Delegates toDisplay.display(Output), ifobjectimplementsDisplay; otherwise returns the result ofObject.toString().- Throws:
OutputException- if theoutputexits the cont state before the full display string has been written.
-
display
- Throws:
OutputException- if theoutputexits the cont state before the full display string has been written.- See Also:
-
debug
Writes the code points of the developer-readableDebugstring for the givenobjecttooutput. Assumesoutputis a UnicodeOutputwriter with sufficient capacity. Delegates toDebug.debug(Output), ifobjectimplementsDebug; writes a Java string literal, ifobjectis aString, and writes a Java number literal, ifobjectis aNumber; otherwise writes the result ofObject.toString().- Returns:
- the continuation of the
output.
-
debug
Returns the developer-readableDisplaystring for the givemobject, output using the givensettings. Delegates toDebug.debug(Output), ifobjectimplementsDebug; returns a Java string literal, ifobjectis aString, and returns a Java number literal, ifobjectis aNumber; otherwise returns the result ofObject.toString().- Throws:
OutputException- if theoutputexits the cont state before the full display string has been written.
-
debug
- Throws:
OutputException- if theoutputexits the cont state before the full display string has been written.- See Also:
-
displayInt
Writes the code points of the numeric string for the givenvaluetooutput.- Returns:
- the continuation of the
output.
-
displayLong
Writes the code points of the numeric string for the givenvaluetooutput.- Returns:
- the continuation of the
output.
-
displayFloat
Writes the code points of the numeric string for the givenvaluetooutput.- Returns:
- the continuation of the
output.
-
displayDouble
Writes the code points of the numeric string for the givenvaluetooutput.- Returns:
- the continuation of the
output.
-
debugInt
Writes the code points of the Java numeric literal for the givenvaluetooutput.- Returns:
- the continuation of the
output.
-
debugLong
Writes the code points of the Java numeric literal for the givenvaluetooutput.- Returns:
- the continuation of the
output.
-
debugFloat
Writes the code points of the Java numeric literal for the givenvaluetooutput.- Returns:
- the continuation of the
output.
-
debugDouble
Writes the code points of the Java numeric literal for the givenvaluetooutput.- Returns:
- the continuation of the
output.
-
debugChar
Writes the code points of the Java character literal for the givenvaluetooutput.- Returns:
- the continuation of the
output.
-
debugString
Writes the code points of the Java string literal for the givenvaluetooutput.- Returns:
- the continuation of the
output.
-
lineSeparator
Returns the operting system specific string used to separate lines of text.
-