java.lang.Object
swim.codec.OutputSettings
- All Implemented Interfaces:
Debug
-
Field Summary
Modifier and TypeFieldDescriptionprotected final boolean
protected final boolean
protected final String
-
Constructor Summary
ModifierConstructorDescriptionprotected
OutputSettings
(String lineSeparator, boolean isPretty, boolean isStyled) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
protected OutputSettings
static final OutputSettings
ReturnsOutputSettings
configured with the givenlineSeparator
, pretty printing enabled ifisPretty
istrue
, and styling enabled ifisStyled
istrue
.<T> Output<T>
Writes a developer readable, debug-formatted string representation of this object tooutput
.boolean
int
hashCode()
final boolean
isPretty()
Returnstrue
if output producers should pretty print their output, when possible.isPretty
(boolean isPretty) Returns a copy of these settings with the givenisPretty
flag.final boolean
isStyled()
Returnstrue
if output producers should style their output, when possible.isStyled
(boolean isStyled) Returns a copy of these settings with the givenisStyled
flag.final String
Returns the code point sequence used to separate lines of text.lineSeparator
(String lineSeparator) Returns a copy of these settings with the givenlineSeparator
.static final OutputSettings
pretty()
ReturnsOutputSettings
configured with the system line separator, pretty printing enabled, and styling disabled.static final OutputSettings
ReturnsOutputSettings
configured with the system line separator, pretty printing enabled, and styling enabled.static final OutputSettings
standard()
ReturnsOutputSettings
configured with the system line separator, pretty printing disabled, and styling disabled.static final OutputSettings
styled()
ReturnsOutputSettings
configured with the system line separator, pretty printing disabled, and styling enabled.toString()
-
Field Details
-
lineSeparator
-
isPretty
protected final boolean isPretty -
isStyled
protected final boolean isStyled
-
-
Constructor Details
-
OutputSettings
-
-
Method Details
-
lineSeparator
Returns the code point sequence used to separate lines of text. Defaults to the operating system's line separator. -
lineSeparator
Returns a copy of these settings with the givenlineSeparator
. -
isPretty
public final boolean isPretty()Returnstrue
if output producers should pretty print their output, when possible. -
isPretty
Returns a copy of these settings with the givenisPretty
flag. -
isStyled
public final boolean isStyled()Returnstrue
if output producers should style their output, when possible. -
isStyled
Returns a copy of these settings with the givenisStyled
flag. -
copy
-
canEqual
-
equals
-
hashCode
public int hashCode() -
debug
Description copied from interface:Debug
Writes a developer readable, debug-formatted string representation of this object tooutput
. -
toString
-
standard
ReturnsOutputSettings
configured with the system line separator, pretty printing disabled, and styling disabled. -
pretty
ReturnsOutputSettings
configured with the system line separator, pretty printing enabled, and styling disabled. -
styled
ReturnsOutputSettings
configured with the system line separator, pretty printing disabled, and styling enabled. -
prettyStyled
ReturnsOutputSettings
configured with the system line separator, pretty printing enabled, and styling enabled. -
create
ReturnsOutputSettings
configured with the givenlineSeparator
, pretty printing enabled ifisPretty
istrue
, and styling enabled ifisStyled
istrue
.
-