|
|||||||||||||||||||
This license of Clover is provided to support the development of JBind only. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover. | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
Parent.java | 0% | 50% | 71,4% | 52,9% |
|
1 |
/* |
|
2 |
* JBind |
|
3 |
* |
|
4 |
* Copyright (c) by Stefan Wachter. All rights reserved. |
|
5 |
* |
|
6 |
* Usage, modification, and redistribution is subject to license terms that are |
|
7 |
* available at 'http://www.jbind.org'. The JBind license is like the |
|
8 |
* 'Apache Software License V 1.1'. |
|
9 |
*/ |
|
10 |
package org.jbind.xml.schema.element; |
|
11 |
|
|
12 |
import java.util.ArrayList; |
|
13 |
import java.util.Iterator; |
|
14 |
import java.util.List; |
|
15 |
import java.util.ListIterator; |
|
16 |
|
|
17 |
import org.jbind.xml.core.cmp.IAppInfoVisitor; |
|
18 |
import org.jbind.xml.core.cmp.IXmlNode; |
|
19 |
|
|
20 |
public class Parent implements IParent { |
|
21 |
|
|
22 |
private List myChildren = new ArrayList(); |
|
23 |
|
|
24 | 33202 |
private List getChildren() { |
25 | 33202 |
return myChildren; |
26 |
} |
|
27 |
|
|
28 | 6082 |
public void addChild(INode aChild) { |
29 | 6082 |
getChildren().add(aChild); |
30 |
} |
|
31 |
|
|
32 | 26815 |
public ListIterator iterChildren() { |
33 | 26815 |
return getChildren().listIterator(); |
34 |
} |
|
35 |
|
|
36 | 305 |
public boolean hasChildren() { |
37 | 305 |
return getChildren().size() > 0; |
38 |
} |
|
39 |
|
|
40 | 6783 |
public Parent() {} |
41 |
|
|
42 | 0 |
public Iterator iterXmlNodes() { |
43 | 0 |
return iterChildren(); |
44 |
} |
|
45 |
|
|
46 | 0 |
protected void visitChildren(IAppInfoVisitor aVisitor) { |
47 | 0 |
for (Iterator i = iterXmlNodes(); i.hasNext(); ) { |
48 | 0 |
IXmlNode node = (IXmlNode)i.next(); |
49 | 0 |
node.acceptAppInfoVisitor(aVisitor); |
50 |
} |
|
51 |
} |
|
52 |
} |
|
53 |
|
|