| Modifier and Type | Field and Description |
|---|---|
protected static com.google.common.collect.Range<java.lang.Integer> |
EMPTY_RANGE |
protected java.util.List<com.google.common.collect.Range<java.lang.Integer>> |
ranges
The
Ranges of the tokens or comments lying on each line, in any part. |
| Constructor and Description |
|---|
InputOutput() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
computeRanges(java.util.List<? extends Input.Tok> toks) |
java.lang.String |
getLine(int lineI)
Get a line.
|
int |
getLineCount()
Get the line count.
|
com.google.common.collect.Range<java.lang.Integer> |
getRanges(int lineI)
Get the
Range of Input.Toks lying in any part on a line. |
static java.util.Map<java.lang.Integer,com.google.common.collect.Range<java.lang.Integer>> |
makeKToIJ(InputOutput put)
Given an
InputOutput, compute the map from tok indices to line ranges. |
protected void |
setLines(com.google.common.collect.ImmutableList<java.lang.String> lines)
Set the lines.
|
java.lang.String |
toString() |
protected static final com.google.common.collect.Range<java.lang.Integer> EMPTY_RANGE
protected final java.util.List<com.google.common.collect.Range<java.lang.Integer>> ranges
Ranges of the tokens or comments lying on each line, in any part.protected final void setLines(com.google.common.collect.ImmutableList<java.lang.String> lines)
public final int getLineCount()
public final java.lang.String getLine(int lineI)
lineI - the line numberprotected final void computeRanges(java.util.List<? extends Input.Tok> toks)
public static java.util.Map<java.lang.Integer,com.google.common.collect.Range<java.lang.Integer>> makeKToIJ(InputOutput put)
InputOutput, compute the map from tok indices to line ranges.put - the InputOutputcom.google.googlejavaformat.java.JavaInput.Tok indices to line
ranges in this putpublic final com.google.common.collect.Range<java.lang.Integer> getRanges(int lineI)
Range of Input.Toks lying in any part on a line.lineI - the line numberRange of Input.Toks on the specified linepublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2015-2018 Google Inc.. All Rights Reserved.