|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList
org.incava.text.LineMapping
public class LineMapping
Converts from 0-indexed string positions to line:column values. Lines and columns are 1-indexed, matching the Java parser.
Nested Class Summary | |
---|---|
class |
LineMapping.PositionToLocation
|
Field Summary |
---|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
LineMapping(java.lang.String text,
int startLine,
int startColumn)
|
Method Summary | |
---|---|
Location |
getLocation(int pos)
Converts the string position to a line:column location. |
Location[] |
getLocations(int startPos,
int endPos)
Converts the string position to a line:column start and end location. |
Location[] |
getLocations(java.awt.Point pos)
Converts the string position to a line:column start and end location. |
Methods inherited from class java.util.ArrayList |
---|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
---|
equals, hashCode |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
containsAll, equals, hashCode |
Constructor Detail |
---|
public LineMapping(java.lang.String text, int startLine, int startColumn)
Method Detail |
---|
public Location[] getLocations(java.awt.Point pos)
public Location[] getLocations(int startPos, int endPos)
public Location getLocation(int pos)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |