Coverage details for edu.uci.ics.jung.graph.decorators.MapNumberVertexValue

LineHitsSource
1 /*
2  * Created on May 9, 2005
3  *
4  * Copyright (c) 2005, the JUNG Project and the Regents of the University
5  * of California
6  * All rights reserved.
7  *
8  * This software is open-source under the BSD license; see either
9  * "license.txt" or
10  * http://jung.sourceforge.net/license.txt for a description.
11  */
12 package edu.uci.ics.jung.graph.decorators;
13  
14 import java.util.HashMap;
15 import java.util.Map;
16  
17 import edu.uci.ics.jung.graph.ArchetypeVertex;
18  
19 /**
20  * A simple implementation of <code>NumberVertexValue</code> backed by a
21  * <code>Map</code>.
22  *
23  * @author Joshua O'Madadhain
24  */
25 public class MapNumberVertexValue implements NumberVertexValue
26 {
27     protected Map map;
28     
29     public MapNumberVertexValue()
300    {
310        this.map = new HashMap();
320    }
33     
34     public Number getNumber(ArchetypeVertex v)
35     {
360        return (Number)map.get(v);
37     }
38  
39     public void setNumber(ArchetypeVertex v, Number n)
40     {
410        map.put(v, n);
420    }
43 }

this report was generated by version 1.0.5 of jcoverage.
visit www.jcoverage.com for updates.

copyright © 2003, jcoverage ltd. all rights reserved.
Java is a trademark of Sun Microsystems, Inc. in the United States and other countries.