| Modifier and Type | Method and Description |
|---|---|
void |
add(DocBuilder builder)
Add an
Op to a DocBuilder. |
State |
computeBreaks(CommentsHelper commentsHelper,
int maxWidth,
State state,
Obs.ExplorationNode observationNode)
Make breaking decisions for a
Doc. |
protected java.lang.String |
computeFlat()
Compute the
Doc's flat value. |
protected com.google.common.collect.Range<java.lang.Integer> |
computeRange()
Compute the
Doc's Range of Input.Tokens. |
protected float |
computeWidth()
Compute the
Doc's width. |
static NonBreakingSpace |
make() |
java.lang.String |
toString() |
void |
write(State state,
Output output)
Write a
Doc to an Output, after breaking decisions have been made. |
idpublic static NonBreakingSpace make()
public void add(DocBuilder builder)
OpOp to a DocBuilder.add in interface Opbuilder - the DocBuilderprotected float computeWidth()
DocDoc's width.computeWidth in class DocFloat.POSITIVE_INFINITY if it must be brokenprotected java.lang.String computeFlat()
DocDoc's flat value. Not defined (and never called) if contains forced breaks.computeFlat in class Docprotected com.google.common.collect.Range<java.lang.Integer> computeRange()
DocDoc's Range of Input.Tokens.computeRange in class DocRangepublic State computeBreaks(CommentsHelper commentsHelper, int maxWidth, State state, Obs.ExplorationNode observationNode)
DocDoc.computeBreaks in class DocmaxWidth - the maximum line widthstate - the current output statepublic void write(State state, Output output)
DocDoc to an Output, after breaking decisions have been made.public java.lang.String toString()
toString in class java.lang.Object