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

COVERAGE SUMMARY FOR SOURCE FILE [ConfigRuntime.java]

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

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ConfigRuntime100% (1/1)100% (5/5)94%  (68/72)96%  (23/24)
toString (): String 100% (1/1)91%  (40/44)93%  (13/14)
ConfigRuntime (): void 100% (1/1)100% (6/6)100% (3/3)
addPlatform (ConfigPlatform): void 100% (1/1)100% (15/15)100% (4/4)
getPlatforms (): List 100% (1/1)100% (3/3)100% (1/1)
setPlatforms (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.Concept;
21import jade.util.leap.Iterator;
22import jade.util.leap.LinkedList;
23import jade.util.leap.List;
24 
25/**
26 * Class to represent an argument to an agent in the JademxConfigOntology.
27 * @author David Bernstein, <a href="http://www.caboodlenetworks.com"
28 *  >Caboodle Networks, Inc.</a>
29 */
30public class ConfigRuntime implements Concept  {
31 
32    /** list of options of type String */
33    private List platforms = null;   
34    
35    /**
36     * Constructor 
37     */
38    public ConfigRuntime() {
39    }
40 
41    /**
42     * add one platform at a time
43     * @param platform platform to add
44     */
45    public void addPlatform( ConfigPlatform platform ) {
46        if ( null == platforms ) {
47            platforms = new LinkedList();
48        }
49        platforms.add( platform );
50    }
51 
52    /**
53     * @return Returns the options.
54     */
55    public List getPlatforms() {
56        return platforms;
57    }
58 
59    /**
60     * @param options The options to set.
61     */
62    public void setPlatforms(List options) {
63        this.platforms = options;
64    }
65 
66    /* (non-Javadoc)
67     * @see java.lang.Object#toString()
68     */
69    public String toString() {
70        StringBuffer sb = new StringBuffer();
71        sb.append( "Runtime[" );
72        if ( null != platforms ) {
73            Iterator optionI = platforms.iterator();
74            boolean first = true;
75            while ( optionI.hasNext() ) {
76                if ( first ) {
77                    first = false;
78                }
79                else {
80                    sb.append(",");
81                }
82                sb.append( optionI.next().toString() );
83            }
84        }   
85        sb.append("]");
86        return sb.toString();
87    }
88 
89}

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