Package com.google.googlejavaformat
Class InputOutput
java.lang.Object
com.google.googlejavaformat.InputOutput
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final com.google.common.collect.Range<Integer>TheRanges of the tokens or comments lying on each line, in any part. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidcomputeRanges(List<? extends Input.Tok> toks) final StringgetLine(int lineI) Get a line.final intGet the line count.final com.google.common.collect.Range<Integer>getRanges(int lineI) Get theRangeofInput.Toks lying in any part on a line.makeKToIJ(InputOutput put) Given anInputOutput, compute the map from tok indices to line ranges.protected final voidSet the lines.toString()
-
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
Get theRangeofInput.Toks lying in any part on a line.- Parameters:
lineI- the line number- Returns:
- the
RangeofInput.Toks on the specified line
-
toString
-