org.apache.hivemind.impl
Class LocationImpl

java.lang.Object
  extended by org.apache.hivemind.impl.LocationImpl
All Implemented Interfaces:
Location

public final class LocationImpl
extends java.lang.Object
implements Location

Implementation of the Location interface. Uses a line and column based position.

Author:
Howard Lewis Ship

Constructor Summary
LocationImpl(Resource resource)
           
LocationImpl(Resource resource, int lineNumber)
           
LocationImpl(Resource resource, int lineNumber, int columnNumber)
           
 
Method Summary
 boolean equals(java.lang.Object other)
           
 int getColumnNumber()
           
 int getLineNumber()
           
 java.lang.String getPosition()
          Returns the position in format "line x, column y"
 Resource getResource()
          The resource containing the location.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocationImpl

public LocationImpl(Resource resource)

LocationImpl

public LocationImpl(Resource resource,
                    int lineNumber)

LocationImpl

public LocationImpl(Resource resource,
                    int lineNumber,
                    int columnNumber)
Method Detail

getResource

public Resource getResource()
Description copied from interface: Location
The resource containing the location.

Specified by:
getResource in interface Location

getLineNumber

public int getLineNumber()

getColumnNumber

public int getColumnNumber()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

getPosition

public java.lang.String getPosition()
Returns the position in format "line x, column y"

Specified by:
getPosition in interface Location
See Also:
Location.getPosition()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.