java.lang.Object
com.google.googlejavaformat.InputOutput
public abstract class InputOutput extends Object
-
Field Summary
-
Constructor Summary
Constructors Constructor Description InputOutput() -
Method Summary
Modifier and Type Method Description protected voidcomputeRanges(List<? extends Input.Tok> toks)StringgetLine(int lineI)Get a line.intgetLineCount()Get the line count.Range<Integer>getRanges(int lineI)static Map<Integer,Range<Integer>>makeKToIJ(InputOutput put)Given anInputOutput, compute the map from tok indices to line ranges.protected voidsetLines(ImmutableList<String> lines)Set the lines.StringtoString()
-
Field Details
-
EMPTY_RANGE
-
ranges
TheRanges of the tokens or comments lying on each line, in any part.
-
-
Constructor Details
-
InputOutput
public InputOutput()
-
-
Method Details
-
setLines
Set the lines. -
getLineCount
public final int getLineCount()Get the line count.- Returns:
- the line count
-
getLine
Get a line.- Parameters:
lineI- the line number- Returns:
- the line
-
computeRanges
-
makeKToIJ
Given anInputOutput, compute the map from tok indices to line ranges.- Parameters:
put- theInputOutput- Returns:
- the map from
com.google.googlejavaformat.java.JavaInput.Tokindices to line ranges in thisput
-
getRanges
-
toString
-