public class MutableTextLocation extends Object implements TextLocation
TextLocation for use in cases where line and column is
important.| Constructor and Description |
|---|
MutableTextLocation(int line,
int column)
Create a new location representing the given line and column.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Location o) |
MutableTextLocation |
copy()
Create a copy of this location.
|
TextLocation |
copyFrom(TextLocation location) |
boolean |
equals(Object obj) |
int |
getColumn()
Get the column this location represents.
|
int |
getLine()
Get the line this location represents.
|
int |
hashCode() |
MutableTextLocation |
moveTextIndex(CharSequence sequence)
Move the text index according to the given sequence of characters.
|
MutableTextLocation |
moveTextIndex(CharSequence sequence,
int offset,
int length)
Move the text index according to the given sequence of characters.
|
MutableTextLocation |
moveTo(int line,
int column)
Move the line and column of this location, returning either itself if
utable or a copy if this instance is immutable.
|
String |
toString()
Return a string representation of this location suitable for debugging
output, such as in log messages.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitisAfter, isBefore, isSameOrAfter, isSameOrBefore, offset, textpublic MutableTextLocation(int line,
int column)
line - zero-indexed linecolumn - zero-indexed columnpublic int getLine()
TextLocationgetLine in interface TextLocationpublic int getColumn()
TextLocationgetColumn in interface TextLocationpublic MutableTextLocation moveTo(int line, int column)
TextLocationmoveTo in interface TextLocationpublic TextLocation copyFrom(TextLocation location)
public MutableTextLocation copy()
TextLocationcopy in interface Locationcopy in interface TextLocationpublic MutableTextLocation moveTextIndex(CharSequence sequence)
TextLocationmoveTextIndex in interface LocationmoveTextIndex in interface TextLocationpublic MutableTextLocation moveTextIndex(CharSequence sequence, int offset, int length)
TextLocationmoveTextIndex in interface LocationmoveTextIndex in interface TextLocationpublic int compareTo(Location o)
compareTo in interface Comparable<Location>Copyright © 2018. All rights reserved.