java.lang.Object
swim.codec.Format
Text format utility functions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
static String
debug
(Object object, OutputSettings settings) Returns the developer-readableDisplay
string 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 givenvalue
tooutput
.static <T> Output<T>
debugDouble
(Output<T> output, double value) Writes the code points of the Java numeric literal for the givenvalue
tooutput
.static <T> Output<T>
debugFloat
(Output<T> output, float value) Writes the code points of the Java numeric literal for the givenvalue
tooutput
.static <T> Output<T>
Writes the code points of the Java numeric literal for the givenvalue
tooutput
.static <T> Output<T>
Writes the code points of the Java numeric literal for the givenvalue
tooutput
.static <T> Output<T>
debugString
(Output<T> output, String value) Writes the code points of the Java string literal for the givenvalue
tooutput
.static String
static String
display
(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 givenvalue
tooutput
.static <T> Output<T>
displayFloat
(Output<T> output, float value) Writes the code points of the numeric string for the givenvalue
tooutput
.static <T> Output<T>
displayInt
(Output<T> output, int value) Writes the code points of the numeric string for the givenvalue
tooutput
.static <T> Output<T>
displayLong
(Output<T> output, long value) Writes the code points of the numeric string for the givenvalue
tooutput
.static String
Returns the operting system specific string used to separate lines of text.
-
Method Details
-
display
Writes the code points of the human-readableDisplay
string for the givenobject
tooutput
. Assumesoutput
is a UnicodeOutput
writer with sufficient capacity. Delegates toDisplay.display(Output)
, ifobject
implementsDisplay
; otherwise writes the result ofObject.toString()
.- Returns:
- the continuation of the
output
.
-
display
Returns the human-readableDisplay
string for the givemobject
, output using the givensettings
. Delegates toDisplay.display(Output)
, ifobject
implementsDisplay
; otherwise returns the result ofObject.toString()
.- Throws:
OutputException
- if theoutput
exits the cont state before the full display string has been written.
-
display
- Throws:
OutputException
- if theoutput
exits the cont state before the full display string has been written.- See Also:
-
debug
Writes the code points of the developer-readableDebug
string for the givenobject
tooutput
. Assumesoutput
is a UnicodeOutput
writer with sufficient capacity. Delegates toDebug.debug(Output)
, ifobject
implementsDebug
; writes a Java string literal, ifobject
is aString
, and writes a Java number literal, ifobject
is aNumber
; otherwise writes the result ofObject.toString()
.- Returns:
- the continuation of the
output
.
-
debug
Returns the developer-readableDisplay
string for the givemobject
, output using the givensettings
. Delegates toDebug.debug(Output)
, ifobject
implementsDebug
; returns a Java string literal, ifobject
is aString
, and returns a Java number literal, ifobject
is aNumber
; otherwise returns the result ofObject.toString()
.- Throws:
OutputException
- if theoutput
exits the cont state before the full display string has been written.
-
debug
- Throws:
OutputException
- if theoutput
exits the cont state before the full display string has been written.- See Also:
-
displayInt
Writes the code points of the numeric string for the givenvalue
tooutput
.- Returns:
- the continuation of the
output
.
-
displayLong
Writes the code points of the numeric string for the givenvalue
tooutput
.- Returns:
- the continuation of the
output
.
-
displayFloat
Writes the code points of the numeric string for the givenvalue
tooutput
.- Returns:
- the continuation of the
output
.
-
displayDouble
Writes the code points of the numeric string for the givenvalue
tooutput
.- Returns:
- the continuation of the
output
.
-
debugInt
Writes the code points of the Java numeric literal for the givenvalue
tooutput
.- Returns:
- the continuation of the
output
.
-
debugLong
Writes the code points of the Java numeric literal for the givenvalue
tooutput
.- Returns:
- the continuation of the
output
.
-
debugFloat
Writes the code points of the Java numeric literal for the givenvalue
tooutput
.- Returns:
- the continuation of the
output
.
-
debugDouble
Writes the code points of the Java numeric literal for the givenvalue
tooutput
.- Returns:
- the continuation of the
output
.
-
debugChar
Writes the code points of the Java character literal for the givenvalue
tooutput
.- Returns:
- the continuation of the
output
.
-
debugString
Writes the code points of the Java string literal for the givenvalue
tooutput
.- Returns:
- the continuation of the
output
.
-
lineSeparator
Returns the operting system specific string used to separate lines of text.
-