EMMA Coverage Report (generated Sat Jul 01 16:38:45 PDT 2006)
[all classes][jade.jademx.config.jademx.onto]

COVERAGE SUMMARY FOR SOURCE FILE [JademxConfig.java]

nameclass, %method, %block, %line, %
JademxConfig.java100% (1/1)100% (5/5)94%  (68/72)96%  (23/24)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class JademxConfig100% (1/1)100% (5/5)94%  (68/72)96%  (23/24)
toString (): String 100% (1/1)91%  (40/44)93%  (13/14)
JademxConfig (): void 100% (1/1)100% (6/6)100% (3/3)
addRuntime (ConfigRuntime): void 100% (1/1)100% (15/15)100% (4/4)
getRuntimes (): List 100% (1/1)100% (3/3)100% (1/1)
setRuntimes (List): void 100% (1/1)100% (4/4)100% (2/2)

1// jademx - JADE management using JMX
2// Copyright 2005 Caboodle Networks, Inc.
3//
4// This library is free software; you can redistribute it and/or
5// modify it under the terms of the GNU Lesser General Public
6// License as published by the Free Software Foundation; either
7// version 2.1 of the License, or (at your option) any later version.
8//
9// This library is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12// Lesser General Public License for more details.
13//
14// You should have received a copy of the GNU Lesser General Public
15// License along with this library; if not, write to the Free Software
16// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
17 
18package jade.jademx.config.jademx.onto;
19 
20import jade.content.AgentAction;
21import jade.util.leap.Iterator;
22import jade.util.leap.LinkedList;
23import jade.util.leap.List;
24 
25/**
26 * top-level concept in jademx config ontology.
27 * should runtimes be limited to single one?
28 * @author David Bernstein, <a href="http://www.caboodlenetworks.com"
29 *  >Caboodle Networks, Inc.</a>
30 */
31public class JademxConfig implements AgentAction, JademxConfigVocabulary {
32 
33    /** list of runtimes of type Runtime */
34    private List runtimes = null; 
35 
36    /**
37     * Create a new jademx config class
38     */
39    public JademxConfig() {
40    }
41 
42    /**
43     * @return Returns the runtimes.
44     */
45    public List getRuntimes() {
46        return runtimes;
47    }
48 
49    /**
50     * @param runtimes The runtimes to set.
51     */
52    public void setRuntimes(List runtimes) {
53        this.runtimes = runtimes;
54    }    
55    
56    /**
57     * add a runtime to this configuration
58     * @param runtime runtime to add
59     */
60    public void addRuntime( ConfigRuntime runtime ) {
61        if ( null == runtimes ) {
62            runtimes = new LinkedList();
63        }
64        runtimes.add( runtime );
65    }
66 
67    /* (non-Javadoc)
68     * @see java.lang.Object#toString()
69     */
70    public String toString() {
71        StringBuffer sb = new StringBuffer();
72        sb.append( "JademxConfig[" );
73        if ( null != runtimes ) {
74            Iterator runtimeI = runtimes.iterator();
75            boolean first = true;
76            while ( runtimeI.hasNext() ) {
77                if ( first ) {
78                    first = false;
79                }
80                else {
81                    sb.append(",");
82                }
83                sb.append( runtimeI.next().toString() );
84            }
85        }   
86        sb.append("]");
87        return sb.toString();
88    }
89 
90}

[all classes][jade.jademx.config.jademx.onto]
EMMA 2.0.5312 (C) Vladimir Roubtsov