org.drools.eclipse.editors.rete.model
Class Connection

java.lang.Object
  extended by org.drools.eclipse.editors.rete.model.ModelElement
      extended by org.drools.eclipse.editors.rete.model.Connection

public class Connection
extends ModelElement

A connection between two distinct vertices.


Constructor Summary
Connection(BaseVertex source, BaseVertex target)
          Creating a connection between two distinct vertices.
 
Method Summary
 void disconnect()
          Disconnect this connection from the vertices it is attached to.
 BaseVertex getOpposite(BaseVertex vertex)
          Gets opposite of specified vertex.
 BaseVertex getSource()
          Returns the source endpoint of this connection.
 BaseVertex getTarget()
          Returns the target endpoint of this connection.
 
Methods inherited from class org.drools.eclipse.editors.rete.model.ModelElement
addPropertyChangeListener, firePropertyChange, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Connection

public Connection(BaseVertex source,
                  BaseVertex target)
Creating a connection between two distinct vertices.

Parameters:
source - a source endpoint
target - a target endpoint
Throws:
IllegalArgumentException - if any of the parameters are null or source == target
Method Detail

disconnect

public void disconnect()
Disconnect this connection from the vertices it is attached to.


getSource

public BaseVertex getSource()
Returns the source endpoint of this connection.

Returns:
BaseVertex vertex

getTarget

public BaseVertex getTarget()
Returns the target endpoint of this connection.

Returns:
BaseVertex vertex

getOpposite

public BaseVertex getOpposite(BaseVertex vertex)
Gets opposite of specified vertex. Returning null if specified not does not belong into this connection.

Parameters:
vertex -
Returns:
opposite of vertex


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.