Clover coverage report - JGAP 3.1
Coverage timestamp: Mo Dez 11 2006 21:16:18 CET
file stats: LOC: 63   Methods: 5
NCLOC: 24   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
DataElementsDocument.java - 100% 100% 100%
coverage
 1    /*
 2    * This file is part of JGAP.
 3    *
 4    * JGAP offers a dual license model containing the LGPL as well as the MPL.
 5    *
 6    * For licencing information please see the file license.txt included with JGAP
 7    * or have a look at the top of class org.jgap.Chromosome which representatively
 8    * includes the JGAP license policy applicable for any file delivered with JGAP.
 9    */
 10    package org.jgap.data;
 11   
 12    /**
 13    * The IDataCreators interface represents an entity comparable to
 14    * org.w3c.dom.Document
 15    *
 16    * @author Klaus Meffert
 17    * @since 2.0
 18    */
 19    public class DataElementsDocument
 20    implements IDataCreators {
 21    /** String containing the CVS revision. Read out via reflection!*/
 22    private final static String CVS_REVISION = "$Revision: 1.5 $";
 23   
 24    private IDataElementList m_tree;
 25   
 26   
 27  4 public void setTree(final IDataElementList a_tree) {
 28  4 m_tree = a_tree;
 29    }
 30   
 31    /**
 32    * @return the tree (of elements) held by this class
 33    *
 34    * @author Klaus Meffert
 35    * @since 2.0
 36    */
 37  11 public IDataElementList getTree() {
 38  11 return m_tree;
 39    }
 40   
 41  8 public DataElementsDocument()
 42    throws Exception {
 43  8 m_tree = new DataElementList();
 44    }
 45   
 46  1 public IDataCreators newDocument()
 47    throws Exception {
 48  1 return new DataElementsDocument();
 49    }
 50   
 51    /**
 52    * Appends a child element to the tree
 53    * @param a_newChild the child to be added to the tree
 54    * @throws Exception
 55    *
 56    * @author Klaus Meffert
 57    * @since 2.0
 58    */
 59  6 public void appendChild(final IDataElement a_newChild)
 60    throws Exception {
 61  6 m_tree.add(a_newChild);
 62    }
 63    }