public final class Location extends Object implements Comparable<Location>, Serializable
| Modifier and Type | Field and Description |
|---|---|
int |
column
Column position.
|
String |
file
Abstract resource name.
|
int |
line
Line position.
|
static Location |
UNKNOWN
Unknown location.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Location other)
Compares this location to the specified one.
|
boolean |
equals(Object obj)
Determines if this location equals to the specified one.
|
int |
hashCode()
Returns a hash code value for this location.
|
String |
toString()
Returns string representing this location.
|
void |
toString(StringBuilder buf)
Appends string representation of this location to the specified buffer.
|
static Location |
valueOf(int line,
int column)
Returns location for the specified line and column positions.
|
static Location |
valueOf(String file)
Returns location for the specified resource name.
|
static Location |
valueOf(String file,
int line,
int column)
Returns location for the specified resource name, line and column
positions.
|
public static final Location UNKNOWN
public final String file
public final int line
public final int column
public int compareTo(Location other)
compareTo in interface Comparable<Location>other - Another location.public int hashCode()
public boolean equals(Object obj)
public String toString()
toString in class ObjecttoString(StringBuilder)public void toString(StringBuilder buf)
file:line:column.buf - Buffer to append.public static Location valueOf(String file)
file - Abstract resource name.public static Location valueOf(int line, int column)
line - Line position.column - Column position.public static Location valueOf(String file, int line, int column)
file - Abstract resource name.line - Line position.column - Column position.Copyright © 2010-2012 FoxLabs. All Rights Reserved.