org.apache.batik.dom.util
Class DocumentDescriptor

java.lang.Object
  |
  +--org.apache.batik.dom.util.DocumentDescriptor

public class DocumentDescriptor
extends java.lang.Object

This class contains informations about a document.


Inner Class Summary
protected static class DocumentDescriptor.Entry
          To manage collisions
 
Field Summary
protected  int count
          The number of entries
protected static int INITIAL_CAPACITY
          The table initial capacity
protected  DocumentDescriptor.Entry[] table
          The underlying array
 
Constructor Summary
DocumentDescriptor()
          Creates a new table.
 
Method Summary
 int getLocationLine(Element elt)
          Returns the location in the source file of the end element.
 int getNumberOfElements()
          Returns the number of elements in the document.
protected  void rehash()
          Rehash the table
 void setLocationLine(Element elt, int line)
          Sets the location in the source file of the end element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INITIAL_CAPACITY

protected static final int INITIAL_CAPACITY
The table initial capacity

table

protected DocumentDescriptor.Entry[] table
The underlying array

count

protected int count
The number of entries
Constructor Detail

DocumentDescriptor

public DocumentDescriptor()
Creates a new table.
Method Detail

getNumberOfElements

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

getLocationLine

public int getLocationLine(Element elt)
Returns the location in the source file of the end element.
Returns:
zero if the information is unknown.

setLocationLine

public void setLocationLine(Element elt,
                            int line)
Sets the location in the source file of the end element.

rehash

protected void rehash()
Rehash the table


Copyright © 2002 Apache Software Foundation. All Rights Reserved.