diva.graphx.toolbox
Class BasicEdge

java.lang.Object
  extended by diva.util.BasicPropertyContainer
      extended by diva.graphx.toolbox.BasicEdge
All Implemented Interfaces:
PropertyContainer

public class BasicEdge
extends BasicPropertyContainer

A basic implementation of an edge.

Version:
$Revision: 1.1 $
Author:
Michael Shilman (michaels@eecs.berkeley.edu)

Constructor Summary
BasicEdge()
          Create a new edge with no tail or head
BasicEdge(BasicNode tail, BasicNode head)
          Create a new edge with the specified tail and head
 
Method Summary
 boolean acceptHead(BasicNode head)
          Return true
 boolean acceptTail(BasicNode tail)
          Return true
 BasicNode getHead()
          Return the head node
 BasicNode getTail()
          Return the tail node
 void setHead(BasicNode head)
          Set the head node.
 void setTail(BasicNode tail)
          Set the tail node.
 
Methods inherited from class diva.util.BasicPropertyContainer
getProperty, properties, propertyNames, removeAllProperties, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicEdge

public BasicEdge()
Create a new edge with no tail or head


BasicEdge

public BasicEdge(BasicNode tail,
                 BasicNode head)
Create a new edge with the specified tail and head

Method Detail

acceptHead

public boolean acceptHead(BasicNode head)
Return true


acceptTail

public boolean acceptTail(BasicNode tail)
Return true


getHead

public BasicNode getHead()
Return the head node


getTail

public BasicNode getTail()
Return the tail node


setHead

public void setHead(BasicNode head)
Set the head node. Disconnect the edge from its current head node (if it has one) and reconnect it to the new head. If the head is null then the edge is just disconnected.


setTail

public void setTail(BasicNode tail)
Set the tail node. Disconnect the edge from its current tail node (if it has one) and reconnect it to the new tail. If the tail is null then the edge is just disconnected.



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.