pbwest 2004/01/04 17:45:32 Modified: src/java/org/apache/fop/datastructs Tag: FOP_0-20-0_Alt-Design Node.java Log: Made children protected. Removed redundant casts flagged by Eclipse. Revision Changes Path No revision No revision 1.1.2.2 +9 -9 xml-fop/src/java/org/apache/fop/datastructs/Attic/Node.java Index: Node.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datastructs/Attic/Node.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- Node.java 5 Jul 2003 19:06:35 -0000 1.1.2.1 +++ Node.java 5 Jan 2004 01:45:32 -0000 1.1.2.2 @@ -97,7 +97,7 @@ protected Tree tree; protected Node parent; - private ArrayList children; // ArrayList of Node + protected ArrayList children; // ArrayList of Node /** Creation size of the <i>children</i> <tt>ArrayList</tt>. */ private static final int FAMILYSIZE = 4; @@ -199,7 +199,7 @@ synchronized (tree) { if (children == null) children = new ArrayList(FAMILYSIZE); - children.add((Object) child); + children.add(child); tree.modified(); } } @@ -221,7 +221,7 @@ synchronized (tree) { if (children == null) children = new ArrayList(FAMILYSIZE); - children.add(index, (Object) child); + children.add(index, child); tree.modified(); } } @@ -418,7 +418,7 @@ public Node removeChild(Node child) throws NoSuchElementException { synchronized (tree) { - int index = children.indexOf((Object) child); + int index = children.indexOf(child); if (index == -1) { throw new NoSuchElementException(); } @@ -531,7 +531,7 @@ * @return the parent <tt>Node</tt>. */ public Node getParent() { - return (Node) parent; + return parent; } /** @@ -956,7 +956,7 @@ // Not the root node; siblings may exist // Set up iterator on the parent's children ArrayList ArrayList siblings = refNode.children; - int index = siblings.indexOf((Object) Node.this); + int index = siblings.indexOf(Node.this); // if this is invalid, we are in serious trouble listIterator = siblings.listIterator(index + 1); } // end of if (Node.this.parent != null) @@ -1068,7 +1068,7 @@ // Not the root node; siblings may exist // Set up iterator on the parent's children ArrayList ArrayList siblings = refNode.children; - int index = siblings.indexOf((Object) Node.this); + int index = siblings.indexOf(Node.this); // if this is invalid, we are in serious trouble listIterator = siblings.listIterator(index); } // end of if (Node.this.parent != null)
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]