|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.ksu.cis.projects.bogor.ast.LocationInfo
public final class LocationInfo
This class is used to store location information in a file.
Constructor Summary | |
---|---|
LocationInfo()
Default constructor. |
|
LocationInfo(Node parent)
Constructor with parent. |
Method Summary | |
---|---|
void |
copyInfoFrom(LocationInfo other)
Copy info from another location info. |
void |
dispose()
Removes reference to parent. |
boolean |
equals(Object o)
Checks whether this object is equal to another object. |
int |
getColumn1()
Gets the start column number. |
int |
getColumn2()
Gets the start position. |
int |
getLine1()
Gets the start line number. |
int |
getLine2()
Gets the end line number. |
Object |
getParent()
Gets the parent of this object. |
int |
hashCode()
Gets the hash code of this object. |
void |
setColumn1(int newColumn1)
Sets the start column number. |
void |
setColumn2(int newColumn2)
Sets the end column number. |
void |
setLine1(int newLine1)
Sets the start position. |
void |
setLine2(int newLine2)
Sets the end line number. |
void |
setParent(Node newParent)
Sets the parent of this object. |
String |
toString()
Returns the string representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LocationInfo()
public LocationInfo(Node parent)
parent
- The parent of this object. Must be non-null.Method Detail |
---|
public void setColumn1(int newColumn1)
newColumn1
- The new start column number. Must be greater than zero.public int getColumn1()
public void setColumn2(int newColumn2)
newColumn2
- int.
The new end column number. Must be greater than zero.public int getColumn2()
public void setLine1(int newLine1)
newPos1
- The new start position. Must be greater than or equal zero.public int getLine1()
public void setLine2(int newLine2)
newLine2
- int.
The new end line number. Must be greater than zero.public int getLine2()
public void setParent(Node newParent)
newParent
- The new parent. Must be non-null.public Object getParent()
public void copyInfoFrom(LocationInfo other)
other
- Another location info to copy info from. Must be non-null.public void dispose()
dispose
in interface Disposable
public boolean equals(Object o)
equals
in class Object
o
- Another object to check equality to.
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |