Line | Hits | Source |
---|---|---|
1 | /* | |
2 | * Created on Nov 7, 2004 | |
3 | * | |
4 | * Copyright (c) 2004, 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.text.NumberFormat; | |
15 | ||
16 | import edu.uci.ics.jung.graph.ArchetypeEdge; | |
17 | import edu.uci.ics.jung.graph.ArchetypeVertex; | |
18 | ||
19 | /** | |
20 | * Returns the values specified by a <code>NumberVertexValue</code> | |
21 | * instance as <code>String</code>s. | |
22 | * | |
23 | * @author Joshua O'Madadhain | |
24 | */ | |
25 | public class NumberVertexValueStringer implements VertexStringer | |
26 | { | |
27 | protected NumberVertexValue nvv; | |
28 | 0 | protected final static NumberFormat nf = NumberFormat.getInstance(); |
29 | ||
30 | public NumberVertexValueStringer(NumberVertexValue nev) | |
31 | 0 | { |
32 | 0 | this.nvv = nev; |
33 | 0 | } |
34 | ||
35 | /** | |
36 | * @see edu.uci.ics.jung.graph.decorators.EdgeStringer#getLabel(ArchetypeEdge) | |
37 | */ | |
38 | public String getLabel(ArchetypeVertex v) | |
39 | { | |
40 | 0 | return nf.format(nvv.getNumber(v)); |
41 | } | |
42 | } |
this report was generated by version 1.0.5 of jcoverage. |
copyright © 2003, jcoverage ltd. all rights reserved. |