Coverage Report - org.kuali.rice.kew.web.ShowHideTree
 
Classes in this File Line Coverage Branch Coverage Complexity
ShowHideTree
0%
0/17
0%
0/2
1.1
 
 1  
 /**
 2  
  * Copyright 2005-2011 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl2.php
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.kew.web;
 17  
 
 18  
 import java.util.ArrayList;
 19  
 import java.util.List;
 20  
 
 21  
 /**
 22  
  * A tree of boolean flags which represent the state of show/hide for the GUI.
 23  
  * 
 24  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 25  
  */
 26  
 public class ShowHideTree implements java.io.Serializable {
 27  
 
 28  
         private static final long serialVersionUID = 6048341469002946402L;
 29  
 
 30  0
         private Boolean show = Boolean.TRUE;
 31  0
     private List children = new ArrayList();
 32  
     
 33  0
     public ShowHideTree() {
 34  0
     }
 35  
     
 36  
     public List getChildren() {
 37  0
         return children;
 38  
     }
 39  
     
 40  
     public void setChildren(List children) {
 41  0
         this.children = children;
 42  0
     }
 43  
         
 44  
     public ShowHideTree getChild(Integer value) {
 45  0
         return getChild(value.intValue());
 46  
     }
 47  
     
 48  
     public ShowHideTree getChild(int value) {
 49  0
         for (int index = children.size(); index <= value; index++) {
 50  0
             children.add(new ShowHideTree());
 51  
         }
 52  0
         return (ShowHideTree)children.get(value);
 53  
     }
 54  
     
 55  
     public ShowHideTree append() {
 56  0
         return getChild(children.size());
 57  
     }
 58  
     
 59  
     public ShowHideTree remove(Integer index) {
 60  0
         return remove(index.intValue());
 61  
     }
 62  
     
 63  
     public ShowHideTree remove(int index) {
 64  0
         return (ShowHideTree)children.remove(index);
 65  
     }
 66  
         
 67  
     public Boolean getShow() {
 68  0
         return show;
 69  
     }
 70  
     
 71  
     public void setShow(Boolean show) {
 72  0
         this.show = show;
 73  0
     }
 74  
         
 75  
 }