mmidy 00/07/31 10:47:02
Modified: java/src/org/apache/xalan/stree ElementImpl.java
Log:
Put getLength method back! should not have been renamed!
Revision Changes Path
1.6 +7 -7
xml-xalan/java/src/org/apache/xalan/stree/ElementImpl.java
Index: ElementImpl.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/stree/ElementImpl.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ElementImpl.java 2000/07/30 22:48:06 1.5
+++ ElementImpl.java 2000/07/31 17:47:02 1.6
@@ -71,9 +71,9 @@
*/
public Node getFirstChild()
{
- // The call to getAttrCount gets the number of attributes in the list.
+ // The call to getLength gets the number of attributes in the list.
// The attributes are put in the list before the actual children.
- return (getChildCount() == 0) ? null : getChild(getAttrCount());
+ return (getChildCount() == 0) ? null : getChild(getLength());
}
/**
@@ -86,7 +86,7 @@
throws ArrayIndexOutOfBoundsException, NullPointerException
{
// wait?
- if (i < getAttrCount())
+ if (i < getLength())
return (AttrImpl)m_children[i];
else
return null;
@@ -118,7 +118,7 @@
}
}
- return (null == m_children) ? 0 : m_children.length - getAttrCount();
+ return (null == m_children) ? 0 : m_children.length - getLength();
}
@@ -244,7 +244,7 @@
*
* @return The number of attributes in the list.
*/
- public int getAttrCount ()
+ public int getLength ()
{
return attrsEnd;
}
@@ -351,7 +351,7 @@
*/
public int getIndex (String uri, String localPart)
{
- for (int i = 0; i < getAttrCount(); i++)
+ for (int i = 0; i < getLength(); i++)
{
AttrImpl attr = (AttrImpl)getChildAttribute(i);
if (attr.getLocalName().equals(localPart) &&
@@ -370,7 +370,7 @@
*/
public int getIndex (String rawName)
{
- for (int i = 0; i < getAttrCount(); i++)
+ for (int i = 0; i < getLength(); i++)
{
AttrImpl attr = getChildAttribute(i);
if (attr.getNodeName().equals(rawName))