Package com.palantir.javaformat
Interface BreakBehaviour.Cases<R>
- Enclosing class:
- BreakBehaviour
public static interface BreakBehaviour.Cases<R>
-
Method Summary
Modifier and TypeMethodDescriptionbreakOnlyIfInnerLevelsThenFitOnOneLine(boolean keepIndentWhenInlined) Break if by doing so all inner levels then fit on a single line.preferBreakingLastInnerLevel(boolean keepIndentWhenInlined) If the last level is breakable, prefer breaking it if it will keep the rest of this level on line line.
-
Method Details
-
breakThisLevel
R breakThisLevel() -
preferBreakingLastInnerLevel
If the last level is breakable, prefer breaking it if it will keep the rest of this level on line line.- Parameters:
keepIndentWhenInlined- whether to keep this level's indent when inlined as a recursive level (when reached via a previous `preferBreakingLastInnerLevel` whose breakability wasLastLevelBreakability.CHECK_INNER)
-
inlineSuffix
R inlineSuffix()Attempt to inline the suffix of this level (which must be aLeveland the last doc), recursing into theLeveljust before the lastLevel(if there is such a level) to see if that can be broken instead.This behaves like
breakThisLevel()if we couldn't recurse into such an inner level, or if the suffix level doesn't fit on the last line. -
breakOnlyIfInnerLevelsThenFitOnOneLine
-