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.

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()
          The column number, or -1 if not known.
 int getLineNumber()
          The line within the resource containing the location, or -1 if the line number is not known.
 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()
Description copied from interface: Location
The line within the resource containing the location, or -1 if the line number is not known.

Specified by:
getLineNumber in interface Location

getColumnNumber

public int getColumnNumber()
Description copied from interface: Location
The column number, or -1 if not known.

Specified by:
getColumnNumber in interface Location

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

toString

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