|
|||||||||||||||||||
| 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 | |||||||||||||||
| GroupUseState.java | 100% | 100% | 100% | 100% |
|
||||||||||||||
| 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.instance.use; |
|
| 11 |
|
|
| 12 |
import java.util.ArrayList; |
|
| 13 |
import java.util.Iterator; |
|
| 14 |
import java.util.List; |
|
| 15 |
|
|
| 16 |
import org.jbind.xml.core.content.IContentDesc; |
|
| 17 |
import org.jbind.xml.core.content.IElemGroupDesc; |
|
| 18 |
import org.jbind.xml.core.content.IUseState; |
|
| 19 |
|
|
| 20 |
public abstract class GroupUseState extends ContentUseState implements IGroupUseState {
|
|
| 21 |
|
|
| 22 |
private List myUseStates = new ArrayList(); |
|
| 23 |
|
|
| 24 | 2721 |
public GroupUseState(IElemGroupDesc aContent, IUseState aParent) {
|
| 25 | 2721 |
super(aContent, aParent); |
| 26 | 2721 |
for (Iterator i = aContent.iterContent(); i.hasNext(); ) {
|
| 27 | 6041 |
IContentDesc c = (IContentDesc)i.next(); |
| 28 | 6041 |
myUseStates.add(c.createUseStateProxy(this)); |
| 29 |
} |
|
| 30 |
} |
|
| 31 |
|
|
| 32 | 3625 |
protected Iterator iterUseStates() {
|
| 33 | 3625 |
return myUseStates.iterator(); |
| 34 |
} |
|
| 35 |
|
|
| 36 | 535 |
protected void doReset() {
|
| 37 | 535 |
super.doReset(); |
| 38 | 535 |
for (Iterator i = iterUseStates(); i.hasNext(); ) {
|
| 39 | 1980 |
IUseState us = (IUseState)i.next(); |
| 40 | 1980 |
us.reset(); |
| 41 |
} |
|
| 42 |
} |
|
| 43 |
} |
|
| 44 |
|
|
||||||||||