@Value.Immutable
@Immutable
public abstract class State
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
State.Builder |
| Constructor and Description |
|---|
State() |
| Modifier and Type | Method and Description |
|---|---|
abstract int |
branchingCoefficient()
Counts how many times reached a branch, where multiple formattings would be considered.
|
protected abstract fj.data.TreeMap<Break,com.palantir.javaformat.doc.State.BreakState> |
breakStates() |
protected abstract fj.data.Set<BreakTag> |
breakTagsTaken() |
static State.Builder |
builder() |
abstract int |
column() |
com.palantir.javaformat.doc.State.BreakState |
getBreakState(Break brk) |
abstract int |
indent()
Next indent, if the level is about to be broken.
|
abstract int |
lastIndent()
Last indent that was actually taken.
|
protected abstract fj.data.TreeMap<Level,com.palantir.javaformat.doc.State.LevelState> |
levelStates() |
abstract boolean |
mustBreak() |
abstract int |
numLines()
Counts how many lines a particular formatting took.
|
static State |
startingState() |
protected abstract fj.data.TreeMap<Comment,com.palantir.javaformat.doc.State.TokState> |
tokStates()
Keep track of how each
Comment was written (these are mostly comments), which can differ depending on the
starting column and the maxLength. |
boolean |
wasBreakTaken(BreakTag breakTag) |
public abstract int lastIndent()
public abstract int indent()
public abstract int column()
public abstract boolean mustBreak()
public abstract int numLines()
public abstract int branchingCoefficient()
withNewBranch()@Value.Auxiliary protected abstract fj.data.Set<BreakTag> breakTagsTaken()
@Value.Auxiliary protected abstract fj.data.TreeMap<Break,com.palantir.javaformat.doc.State.BreakState> breakStates()
@Value.Auxiliary protected abstract fj.data.TreeMap<Level,com.palantir.javaformat.doc.State.LevelState> levelStates()
@Value.Auxiliary protected abstract fj.data.TreeMap<Comment,com.palantir.javaformat.doc.State.TokState> tokStates()
Comment was written (these are mostly comments), which can differ depending on the
starting column and the maxLength.public static State startingState()
public com.palantir.javaformat.doc.State.BreakState getBreakState(Break brk)
public boolean wasBreakTaken(BreakTag breakTag)
public static State.Builder builder()