类 Break
java.lang.Object
com.palantir.javaformat.doc.HasUniqueId
com.palantir.javaformat.doc.Doc
com.palantir.javaformat.doc.Break
- 所有已实现的接口:
Op
A leaf node in a
Doc for an optional break.-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidadd(DocBuilder builder) Add anOpto aDocBuilder.static Break.Builderbuilder()computeBreaks(CommentsHelper commentsHelper, int maxWidth, State state, Obs.ExplorationNode observationNode) Make breaking decisions for aDoc.computeBreaks(State stateIn, boolean broken) protected StringCompute theDoc's flat value.protected com.google.common.collect.Range<Integer> protected floatCompute theDoc's width.intevalPlusIndent(State state) Return theBreak's extra indent.abstract FillModefillMode()abstract Stringflat()abstract booleanIf this break is restricted by its parentLevel'sLevel.getColumnLimitBeforeLastBreak().booleanisForced()Is theBreakforced?static BreakMake aBreak.static BreakMake aBreak.static BreakMake a forcedBreak.optTag()abstract IndentvoidWrite aDocto anOutput, after breaking decisions have been made.从类继承的方法 com.palantir.javaformat.doc.HasUniqueId
id
-
构造器详细资料
-
Break
public Break()
-
-
方法详细资料
-
fillMode
-
flat
-
plusIndent
-
optTag
-
hasColumnLimit
public abstract boolean hasColumnLimit()If this break is restricted by its parentLevel'sLevel.getColumnLimitBeforeLastBreak(). -
make
Make aBreak.- 参数:
fillMode- theFillModeflat- the text when not brokenplusIndent- extra indent if taken- 返回:
- the new
Break
-
make
public static Break make(FillMode fillMode, String flat, Indent plusIndent, Optional<BreakTag> optTag) Make aBreak.- 参数:
fillMode- theFillModeflat- the text when not brokenplusIndent- extra indent if takenoptTag- an optional tag for remembering whether the break was taken- 返回:
- the new
Break
-
makeForced
Make a forcedBreak.- 返回:
- the new forced
Break
-
evalPlusIndent
Return theBreak's extra indent.- 返回:
- the extra indent
-
isForced
public boolean isForced()Is theBreakforced?- 返回:
- whether the
Breakis forced
-
add
从接口复制的说明:OpAdd anOpto aDocBuilder.- 指定者:
add在接口中Op- 参数:
builder- theDocBuilder
-
computeWidth
protected float computeWidth()从类复制的说明:DocCompute theDoc's width.- 指定者:
computeWidth在类中Doc- 返回:
- the width, or
Float.POSITIVE_INFINITYif it must be broken
-
computeFlat
从类复制的说明:DocCompute theDoc's flat value. Not defined (and never called) if contains forced breaks.- 指定者:
computeFlat在类中Doc- 返回:
- the flat value
-
computeRange
从类复制的说明:Doc- 指定者:
computeRange在类中Doc- 返回:
- the
Range
-
computeBreaks
-
computeBreaks
public State computeBreaks(CommentsHelper commentsHelper, int maxWidth, State state, Obs.ExplorationNode observationNode) 从类复制的说明:DocMake breaking decisions for aDoc.- 指定者:
computeBreaks在类中Doc- 参数:
maxWidth- the maximum line widthstate- the current output state- 返回:
- the new output state
-
write
从类复制的说明:DocWrite aDocto anOutput, after breaking decisions have been made. -
builder
-