- java.lang.Object
-
- swim.codec.OutputSettings
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanisPrettyprotected booleanisStyledprotected StringlineSeparator
-
Constructor Summary
Constructors Modifier Constructor Description protectedOutputSettings(String lineSeparator, boolean isPretty, boolean isStyled)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)protected OutputSettingscopy(String lineSeparator, boolean isPretty, boolean isStyled)static OutputSettingscreate(String lineSeparator, boolean isPretty, boolean isStyled)ReturnsOutputSettingsconfigured with the givenlineSeparator, pretty printing enabled ifisPrettyistrue, and styling enabled ifisStyledistrue.<T> Output<T>debug(Output<T> output)Writes a developer readable, debug-formatted string representation of this object tooutput.booleanequals(Object other)inthashCode()booleanisPretty()Returnstrueif output producers should pretty print their output, when possible.OutputSettingsisPretty(boolean isPretty)Returns a copy of these settings with the givenisPrettyflag.booleanisStyled()Returnstrueif output producers should style their output, when possible.OutputSettingsisStyled(boolean isStyled)Returns a copy of these settings with the givenisStyledflag.StringlineSeparator()Returns the code point sequence used to separate lines of text.OutputSettingslineSeparator(String lineSeparator)Returns a copy of these settings with the givenlineSeparator.static OutputSettingspretty()ReturnsOutputSettingsconfigured with the system line separator, pretty printing enabled, and styling disabled.static OutputSettingsprettyStyled()ReturnsOutputSettingsconfigured with the system line separator, pretty printing enabled, and styling enabled.static OutputSettingsstandard()ReturnsOutputSettingsconfigured with the system line separator, pretty printing disabled, and styling disabled.static OutputSettingsstyled()ReturnsOutputSettingsconfigured with the system line separator, pretty printing disabled, and styling enabled.StringtoString()
-
-
-
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()
Returnstrueif output producers should pretty print their output, when possible.
-
isPretty
public OutputSettings isPretty(boolean isPretty)
Returns a copy of these settings with the givenisPrettyflag.
-
isStyled
public final boolean isStyled()
Returnstrueif output producers should style their output, when possible.
-
isStyled
public OutputSettings isStyled(boolean isStyled)
Returns a copy of these settings with the givenisStyledflag.
-
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:DebugWrites a developer readable, debug-formatted string representation of this object tooutput.
-
standard
public static final OutputSettings standard()
ReturnsOutputSettingsconfigured with the system line separator, pretty printing disabled, and styling disabled.
-
pretty
public static final OutputSettings pretty()
ReturnsOutputSettingsconfigured with the system line separator, pretty printing enabled, and styling disabled.
-
styled
public static final OutputSettings styled()
ReturnsOutputSettingsconfigured with the system line separator, pretty printing disabled, and styling enabled.
-
prettyStyled
public static final OutputSettings prettyStyled()
ReturnsOutputSettingsconfigured with the system line separator, pretty printing enabled, and styling enabled.
-
create
public static final OutputSettings create(String lineSeparator, boolean isPretty, boolean isStyled)
ReturnsOutputSettingsconfigured with the givenlineSeparator, pretty printing enabled ifisPrettyistrue, and styling enabled ifisStyledistrue.
-
-