Clover coverage report -
Coverage timestamp: Thu Jul 5 2007 20:02:32 EDT
file stats: LOC: 74   Methods: 8
NCLOC: 48   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
NetworkNode.java 100% 57.1% 62.5% 62.5%
coverage coverage
 1    /*
 2    * JBoss, the OpenSource J2EE webOS
 3    *
 4    * Distributable under LGPL license.
 5    * See terms of license at gnu.org.
 6    */
 7    package org.jboss.cache.pojo.test;
 8   
 9    import java.util.ArrayList;
 10    import java.util.List;
 11   
 12    /**
 13    * Usually corresponds to the physical machine that comparises of various devices.
 14    * <p>This object is used to illustrate the pojo cache capability of PojoCache. Note the absence of <code>Serializable</code>
 15    * interface.</p>
 16    *
 17    * @author <a href="mailto:ben.wang@jboss.com">Ben Wang</a>
 18    */
 19    // We are using JDK1.5 annotation.
 20    @org.jboss.cache.pojo.annotation.Replicable
 21    public class NetworkNode
 22    {
 23    String name_;
 24    List elements_;
 25    String ipAddress_;
 26   
 27  0 public String getName()
 28    {
 29  0 return name_;
 30    }
 31   
 32  12 public void setName(String name)
 33    {
 34  12 name_ = name;
 35    }
 36   
 37  13 public List getElements()
 38    {
 39  13 return elements_;
 40    }
 41   
 42  0 protected void setElements(List elements)
 43    {
 44  0 elements_ = elements;
 45    }
 46   
 47  24 public void addElement(NetworkElement element)
 48    {
 49  24 if (elements_ == null)
 50  12 elements_ = new ArrayList();
 51   
 52  24 elements_.add(element);
 53  24 element.setParentNode(this);
 54    }
 55   
 56  10 public String getIpAddress()
 57    {
 58  10 return ipAddress_;
 59    }
 60   
 61  18 public void setIpAddress(String ipAddress)
 62    {
 63  18 ipAddress_ = ipAddress;
 64    }
 65   
 66  0 public String toString()
 67    {
 68  0 StringBuffer sb = new StringBuffer();
 69  0 sb.append(" name= ").append(getName()).append(" ipAddress= ").append(getIpAddress());
 70  0 sb.append(" elements=").append(getElements());
 71  0 return sb.toString();
 72    }
 73   
 74    }