edu.uci.ics.jung.graph.impl
Class AbstractHyperUnitBPG

java.lang.Object
  extended byedu.uci.ics.jung.graph.impl.AbstractHyperUnitBPG
All Implemented Interfaces:
UserDataContainer
Direct Known Subclasses:
HyperedgeBPG, HypervertexBPG

public abstract class AbstractHyperUnitBPG
extends java.lang.Object
implements UserDataContainer

A support class for both HyperedgeBPG and HyperVertexBPG, this represents a single object backed by a BipartiteVertex that is a member of a HypergraphBPG. Cannot be instantiated on its own.

Author:
danyelf

Nested Class Summary
 
Nested classes inherited from class edu.uci.ics.jung.utils.UserDataContainer
UserDataContainer.CopyAction
 
Constructor Summary
AbstractHyperUnitBPG()
           
 
Method Summary
 void addUserDatum(java.lang.Object key, java.lang.Object datum, UserDataContainer.CopyAction copyAct)
          Adds the specified data with the specified key to this object's user data repository, with the specified CopyAction.
 boolean containsUserDatumKey(java.lang.Object key)
          Reports whether key is a key of this user data container.
 boolean equals(java.lang.Object o)
           
 ArchetypeGraph getGraph()
           
 java.lang.Object getUserDatum(java.lang.Object key)
          Retrieves the object in this object's user data repository to which key refers.
 UserDataContainer.CopyAction getUserDatumCopyAction(java.lang.Object key)
          Retrieves the CopyAction for the object stored in this object's user data repository to which key refers.
 java.util.Iterator getUserDatumKeyIterator()
          Provides an iterator over this object's user data repository key set.
 void importUserData(UserDataContainer udc)
          Takes the user data stored in udc and copies it to this object's user data repository, respecting each datum's CopyAction.
 java.lang.Object removeUserDatum(java.lang.Object key)
          Retrieves the object in this object's user data repository to which key refers, and removes it from the repository.
 void removeVertex(HypervertexBPG hv3)
           
 void setUserDatum(java.lang.Object key, java.lang.Object datum, UserDataContainer.CopyAction copyAct)
          If key refers to an existing user datum in this object's repository, that datum is replaced by the specified datum.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractHyperUnitBPG

public AbstractHyperUnitBPG()
Method Detail

equals

public boolean equals(java.lang.Object o)

getGraph

public ArchetypeGraph getGraph()
See Also:
ArchetypeVertex.getGraph()

addUserDatum

public void addUserDatum(java.lang.Object key,
                         java.lang.Object datum,
                         UserDataContainer.CopyAction copyAct)
Description copied from interface: UserDataContainer
Adds the specified data with the specified key to this object's user data repository, with the specified CopyAction.

Specified by:
addUserDatum in interface UserDataContainer
Parameters:
key - the key of the datum being added
datum - the datum being added
copyAct - the CopyAction of the datum being added
See Also:
UserDataContainer.addUserDatum(java.lang.Object, java.lang.Object, edu.uci.ics.jung.utils.UserDataContainer.CopyAction)

importUserData

public void importUserData(UserDataContainer udc)
Description copied from interface: UserDataContainer
Takes the user data stored in udc and copies it to this object's user data repository, respecting each datum's CopyAction.

Specified by:
importUserData in interface UserDataContainer
Parameters:
udc - the source of the user data to be copied into this container
See Also:
UserDataContainer.importUserData(edu.uci.ics.jung.utils.UserDataContainer)

getUserDatumKeyIterator

public java.util.Iterator getUserDatumKeyIterator()
Description copied from interface: UserDataContainer
Provides an iterator over this object's user data repository key set.

Specified by:
getUserDatumKeyIterator in interface UserDataContainer
See Also:
UserDataContainer.getUserDatumKeyIterator()

getUserDatumCopyAction

public UserDataContainer.CopyAction getUserDatumCopyAction(java.lang.Object key)
Description copied from interface: UserDataContainer
Retrieves the CopyAction for the object stored in this object's user data repository to which key refers.

Specified by:
getUserDatumCopyAction in interface UserDataContainer
Parameters:
key - the key of the datum whose CopyAction is requested
Returns:
CopyAction the requested CopyAction
See Also:
UserDataContainer.getUserDatumCopyAction(java.lang.Object)

getUserDatum

public java.lang.Object getUserDatum(java.lang.Object key)
Description copied from interface: UserDataContainer
Retrieves the object in this object's user data repository to which key refers.

Specified by:
getUserDatum in interface UserDataContainer
Parameters:
key - the key of the datum to retrieve
Returns:
Object the datum retrieved
See Also:
UserDataContainer.getUserDatum(java.lang.Object)

setUserDatum

public void setUserDatum(java.lang.Object key,
                         java.lang.Object datum,
                         UserDataContainer.CopyAction copyAct)
Description copied from interface: UserDataContainer
If key refers to an existing user datum in this object's repository, that datum is replaced by the specified datum. Otherwise this is equivalent to addUserDatum(key, data, copyAct).

Specified by:
setUserDatum in interface UserDataContainer
Parameters:
key - the key of the datum being added/modified
datum - the replacement/new datum
copyAct - the CopyAction for the new (key, datum) pair
See Also:
UserDataContainer.setUserDatum(java.lang.Object, java.lang.Object, edu.uci.ics.jung.utils.UserDataContainer.CopyAction)

removeUserDatum

public java.lang.Object removeUserDatum(java.lang.Object key)
Description copied from interface: UserDataContainer
Retrieves the object in this object's user data repository to which key refers, and removes it from the repository.

Specified by:
removeUserDatum in interface UserDataContainer
Parameters:
key - the key of the datum to be removed
Returns:
Object the datum removed
See Also:
UserDataContainer.removeUserDatum(java.lang.Object)

containsUserDatumKey

public boolean containsUserDatumKey(java.lang.Object key)
Description copied from interface: UserDataContainer
Reports whether key is a key of this user data container.

Specified by:
containsUserDatumKey in interface UserDataContainer
Parameters:
key - the key to be queried
Returns:
true if key is present in this user data container

removeVertex

public void removeVertex(HypervertexBPG hv3)