public class SpacingBuilder.RuleBuilder
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
SpacingBuilder |
blankLines(int count) |
SpacingBuilder |
lineBreakInCode() |
SpacingBuilder |
lineBreakInCodeIf(boolean option) |
SpacingBuilder |
lineBreakOrForceSpace(boolean lbOption,
boolean spaceOption) |
SpacingBuilder |
none() |
SpacingBuilder |
parentDependentLFSpacing(int minSpaces,
int maxSpaces,
boolean keepLineBreaks,
int keepBlankLines)
Similar to
spacing(int, int, int, boolean, int) but replaced by single line break, if parent block spans multiple lines. |
SpacingBuilder |
spaceIf(boolean option) |
SpacingBuilder |
spaceIf(boolean option,
boolean useParentDependentLFSpacing)
If
useParentDependentLFSpacing is true and parent block spans multiple lines, insert single line break. |
SpacingBuilder |
spaces(int count) |
SpacingBuilder |
spaces(int count,
boolean useParentDependentLFSpacing)
If
useParentDependentLFSpacing is true and parent block spans multiple lines, insert single line break. |
SpacingBuilder |
spacing(int minSpaces,
int maxSpaces,
int minLF,
boolean keepLineBreaks,
int keepBlankLines) |
public SpacingBuilder none()
public SpacingBuilder spaceIf(boolean option)
public SpacingBuilder spaceIf(boolean option, boolean useParentDependentLFSpacing)
useParentDependentLFSpacing
is true and parent block spans multiple lines, insert single line break.
Otherwise insert whitespace block with exactly one or no spaces depending on value of option
parameter.public SpacingBuilder spaces(int count)
public SpacingBuilder spaces(int count, boolean useParentDependentLFSpacing)
useParentDependentLFSpacing
is true and parent block spans multiple lines, insert single line break.
Otherwise insert whitespace block that contains as many spaces as specified via count
parameter.public SpacingBuilder blankLines(int count)
public SpacingBuilder lineBreakInCodeIf(boolean option)
public SpacingBuilder lineBreakInCode()
public SpacingBuilder lineBreakOrForceSpace(boolean lbOption, boolean spaceOption)
public SpacingBuilder spacing(int minSpaces, int maxSpaces, int minLF, boolean keepLineBreaks, int keepBlankLines)
public SpacingBuilder parentDependentLFSpacing(int minSpaces, int maxSpaces, boolean keepLineBreaks, int keepBlankLines)
spacing(int, int, int, boolean, int)
but replaced by single line break, if parent block spans multiple lines.