edu.uci.ics.jung.graph.decorators
Class UserDatumNumberVertexValue

java.lang.Object
  extended by edu.uci.ics.jung.graph.decorators.UserDatumNumberVertexValue
All Implemented Interfaces:
NumberVertexValue

public class UserDatumNumberVertexValue
extends Object
implements NumberVertexValue

Author:
Joshua O'Madadhain

Field Summary
protected  UserDataContainer.CopyAction copy_action
           
protected  Object key
           
 
Constructor Summary
UserDatumNumberVertexValue(Object key)
          Creates an instance with the specified key and with a CopyAction of REMOVE.
UserDatumNumberVertexValue(Object key, UserDataContainer.CopyAction copy_action)
          Creates an instance with the specified key and CopyAction.
 
Method Summary
 void clear(ArchetypeGraph g)
          Removes this decoration from g.
 Number getNumber(ArchetypeVertex v)
           
 void setCopyAction(UserDataContainer.CopyAction copy_action)
           
 void setNumber(ArchetypeVertex v, Number n)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key

protected Object key

copy_action

protected UserDataContainer.CopyAction copy_action
Constructor Detail

UserDatumNumberVertexValue

public UserDatumNumberVertexValue(Object key)
Creates an instance with the specified key and with a CopyAction of REMOVE.


UserDatumNumberVertexValue

public UserDatumNumberVertexValue(Object key,
                                  UserDataContainer.CopyAction copy_action)
Creates an instance with the specified key and CopyAction.

Method Detail

setCopyAction

public void setCopyAction(UserDataContainer.CopyAction copy_action)

getNumber

public Number getNumber(ArchetypeVertex v)
Specified by:
getNumber in interface NumberVertexValue
Parameters:
v - the vertex to examine
Returns:
the Number associated with this vertex
See Also:
NumberVertexValue.getNumber(edu.uci.ics.jung.graph.ArchetypeVertex)

setNumber

public void setNumber(ArchetypeVertex v,
                      Number n)
Specified by:
setNumber in interface NumberVertexValue
Parameters:
v - the vertex whose value we're setting
n - the Number to which we're setting the vertex's value
See Also:
NumberVertexValue.setNumber(edu.uci.ics.jung.graph.ArchetypeVertex, java.lang.Number)

clear

public void clear(ArchetypeGraph g)
Removes this decoration from g.