com.steadystate.css.parser
Class LocatorImpl

java.lang.Object
  extended by com.steadystate.css.parser.LocatorImpl
All Implemented Interfaces:
Serializable, org.w3c.css.sac.Locator

public class LocatorImpl
extends Object
implements org.w3c.css.sac.Locator, Serializable

Implementation of Locator.

Author:
David Schweinsberg
See Also:
Serialized Form

Constructor Summary
LocatorImpl(String uri, int line, int column)
          Creates new LocatorImpl
 
Method Summary
 boolean equals(Object obj)
           
 int getColumnNumber()
          Return the column number where the current document event ends.
 int getLineNumber()
          Return the line number where the current document event ends.
 String getUri()
           
 String getURI()
          Return the URI for the current document event.
 int hashCode()
           
 void setColumnNumber(int column)
          Set the columnNumber to a new value.
 void setLineNumber(int line)
          Set the lineNumber to a new value.
 void setUri(String uri)
          Set the uri to a new value.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocatorImpl

public LocatorImpl(String uri,
                   int line,
                   int column)
Creates new LocatorImpl

Parameters:
uri - the uri
line - the lineNumber
column - the columnNumber
Method Detail

getURI

public String getURI()
Return the URI for the current document event.

The parser must resolve the URI fully before passing it to the application.

Specified by:
getURI in interface org.w3c.css.sac.Locator
Returns:
A string containing the URI, or null if none is available.

getUri

public String getUri()
Returns:
@see #getURI()

setUri

public void setUri(String uri)
Set the uri to a new value.

Parameters:
uri - the new uri
See Also:
getURI()

getColumnNumber

public int getColumnNumber()
Return the column number where the current document event ends. Note that this is the column number of the first character after the text associated with the document event. The first column in a line is position 1.

Specified by:
getColumnNumber in interface org.w3c.css.sac.Locator
Returns:
The column number, or -1 if none is available.
See Also:
getLineNumber()

setColumnNumber

public void setColumnNumber(int column)
Set the columnNumber to a new value.

Parameters:
column - the new columnNumber

getLineNumber

public int getLineNumber()
Return the line number where the current document event ends. Note that this is the line position of the first character after the text associated with the document event.

Specified by:
getLineNumber in interface org.w3c.css.sac.Locator
Returns:
The line number, or -1 if none is available.
See Also:
getColumnNumber()

setLineNumber

public void setLineNumber(int line)
Set the lineNumber to a new value.

Parameters:
line - the new lineNumber

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All rights reserved.