org.apache.batik.dom.util

Class DocumentDescriptor

public class DocumentDescriptor extends Object

This class contains informations about a document.
Nested Class Summary
protected classDocumentDescriptor.Entry
To manage collisions
Field Summary
protected intcount
The number of entries
protected static intINITIAL_CAPACITY
The table initial capacity
protected DocumentDescriptor.Entry[]table
The underlying array
Constructor Summary
DocumentDescriptor()
Creates a new table.
Method Summary
intgetLocationColumn(Element elt)
Returns the location column in the source file of the end element.
intgetLocationLine(Element elt)
Returns the location line in the source file of the end element.
intgetNumberOfElements()
Returns the number of elements in the document.
protected voidrehash()
Rehash the table
protected voidremoveEntry(DocumentDescriptor.Entry e)
voidsetLocation(Element elt, int line, int col)
Sets the location in the source file of the end element.

Field Detail

count

protected int count
The number of entries

INITIAL_CAPACITY

protected static final int INITIAL_CAPACITY
The table initial capacity

table

protected DocumentDescriptor.Entry[] table
The underlying array

Constructor Detail

DocumentDescriptor

public DocumentDescriptor()
Creates a new table.

Method Detail

getLocationColumn

public int getLocationColumn(Element elt)
Returns the location column in the source file of the end element.

Returns: zero if the information is unknown.

getLocationLine

public int getLocationLine(Element elt)
Returns the location line in the source file of the end element.

Returns: zero if the information is unknown.

getNumberOfElements

public int getNumberOfElements()
Returns the number of elements in the document.

rehash

protected void rehash()
Rehash the table

removeEntry

protected void removeEntry(DocumentDescriptor.Entry e)

setLocation

public void setLocation(Element elt, int line, int col)
Sets the location in the source file of the end element.
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.