edu.uci.ics.jung.visualization.decorators
Class MapNumberVertexValue<V>

java.lang.Object
  extended by edu.uci.ics.jung.visualization.decorators.MapNumberVertexValue<V>
All Implemented Interfaces:
NumberVertexValue<V>

public class MapNumberVertexValue<V>
extends Object
implements NumberVertexValue<V>

A simple implementation of NumberVertexValue backed by a Map.

Author:
Joshua O'Madadhain

Field Summary
protected  Map<V,Number> map
           
 
Constructor Summary
MapNumberVertexValue()
           
 
Method Summary
 Number getNumber(V v)
           
 void setNumber(V v, Number n)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

protected Map<V,Number> map
Constructor Detail

MapNumberVertexValue

public MapNumberVertexValue()
Method Detail

getNumber

public Number getNumber(V v)
Specified by:
getNumber in interface NumberVertexValue<V>
Parameters:
v - the vertex to examine
Returns:
the Number associated with this vertex

setNumber

public void setNumber(V v,
                      Number n)
Specified by:
setNumber in interface NumberVertexValue<V>
Parameters:
v - the vertex whose value we're setting
n - the Number to which we're setting the vertex's value


Copyright © 2008 null. All Rights Reserved.