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