Browse Source

Made children protected.

Removed redundant casts flagged by Eclipse.


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197116 13f79535-47bb-0310-9956-ffa450edef68
tags/Alt-Design_pre_awt_renderer_import
Peter Bernard West 20 years ago
parent
commit
5a8fc27e60
1 changed files with 7 additions and 7 deletions
  1. 7
    7
      src/java/org/apache/fop/datastructs/Node.java

+ 7
- 7
src/java/org/apache/fop/datastructs/Node.java View File

@@ -97,7 +97,7 @@ public class Node implements Cloneable {

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 @@ public class Node implements Cloneable {
synchronized (tree) {
if (children == null)
children = new ArrayList(FAMILYSIZE);
children.add((Object) child);
children.add(child);
tree.modified();
}
}
@@ -221,7 +221,7 @@ public class Node implements Cloneable {
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 class Node implements Cloneable {
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 @@ public class Node implements Cloneable {
* @return the parent <tt>Node</tt>.
*/
public Node getParent() {
return (Node) parent;
return parent;
}

/**
@@ -956,7 +956,7 @@ public class Node implements Cloneable {
// 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 @@ public class Node implements Cloneable {
// 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)

Loading…
Cancel
Save