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

java.lang.Object
  extended by edu.uci.ics.jung.graph.decorators.Decorator
Direct Known Subclasses:
NumericDecorator

public abstract class Decorator
extends Object

Abstract decorator for cases where attributes are to be stored along with the graph/edge/vertex which they describe

Author:
Scott White

Constructor Summary
protected Decorator(Object key, UserDataContainer.CopyAction action)
          Constructs and initializes the decorator
 
Method Summary
 UserDataContainer.CopyAction getCopyAction()
          Retrieves the user datum copy action that this decorator uses when setting new values
 Object getKey()
          Retrieves the user datum key that this decorator uses when setting new values
 int hashCode()
           
 void removeValue(UserDataContainer udc)
          Removes the values from the user data container
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Decorator

protected Decorator(Object key,
                    UserDataContainer.CopyAction action)
Constructs and initializes the decorator

Parameters:
key -
action -
Method Detail

getCopyAction

public UserDataContainer.CopyAction getCopyAction()
Retrieves the user datum copy action that this decorator uses when setting new values

Returns:
the copy action

getKey

public Object getKey()
Retrieves the user datum key that this decorator uses when setting new values


hashCode

public int hashCode()
Overrides:
hashCode in class Object
Returns:
the hash code for the user datum key

removeValue

public void removeValue(UserDataContainer udc)
Removes the values from the user data container

Parameters:
udc - the vertex/edge/graph being whose value is being removed