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

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

public class UserDatumNumberEdgeValue
extends Object
implements NumberEdgeValue

An implementation of NumberEdgeValue that stores the values in the UserData repository.

Author:
Joshua O'Madadhain

Field Summary
protected  UserDataContainer.CopyAction copy_action
           
protected  Object key
           
 
Constructor Summary
UserDatumNumberEdgeValue(Object key)
          Creates an instance with the specified key and with a CopyAction of REMOVE.
UserDatumNumberEdgeValue(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(ArchetypeEdge e)
           
 void setCopyAction(UserDataContainer.CopyAction copy_action)
           
 void setNumber(ArchetypeEdge e, 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

UserDatumNumberEdgeValue

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


UserDatumNumberEdgeValue

public UserDatumNumberEdgeValue(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(ArchetypeEdge e)
Specified by:
getNumber in interface NumberEdgeValue
Parameters:
e - the edge to examine
Returns:
the Number associated with this edge
See Also:
NumberEdgeValue.getNumber(edu.uci.ics.jung.graph.ArchetypeEdge)

setNumber

public void setNumber(ArchetypeEdge e,
                      Number n)
Specified by:
setNumber in interface NumberEdgeValue
Parameters:
e - the edge whose value we're setting
n - the Number to which we're setting the edge
See Also:
NumberEdgeValue.setNumber(edu.uci.ics.jung.graph.ArchetypeEdge, java.lang.Number)

clear

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