Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

org.evolvica.engine
Class Connection

java.lang.Object
  extended byorg.evolvica.engine.Connection
All Implemented Interfaces:
IConnection

public class Connection
extends java.lang.Object
implements IConnection

Default implementation for a connection.

Since:
0.4.0
Version:
$Revision: 1.5 $ $Date: 2004/05/26 11:58:22 $
Author:
Andreas Rummler

Field Summary
protected  java.lang.Object data
          The stored data object.
protected  IElement source
          The source element.
protected  IElement target
          The target element.
 
Constructor Summary
Connection(IElement source, IElement target)
          Constructor.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void firePropertyChangeEvent(java.beans.PropertyChangeEvent event)
           
 java.lang.Object getData()
          Retrieves a data object from this connection without removing it.
 IElement getSource()
          Returns the source element of this connection.
 IElement getTarget()
          Returns the target element of this connection.
 boolean hasData()
          Checks if there is a data object associated to this connection.
 java.lang.Object popData()
          Retrieves a data object from this connection.
 void pushData(java.lang.Object data)
          Pushes a data object into this connection.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void setSource(IElement source)
          Sets a new source element.
 void setTarget(IElement target)
          Sets a new target element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

protected IElement source
The source element.


target

protected IElement target
The target element.


data

protected java.lang.Object data
The stored data object.

Constructor Detail

Connection

public Connection(IElement source,
                  IElement target)
Constructor.

Parameters:
source - source element
target - target element
Method Detail

getSource

public IElement getSource()
Description copied from interface: IConnection
Returns the source element of this connection.

Specified by:
getSource in interface IConnection
Returns:
source element
See Also:
IConnection.getSource()

setSource

public void setSource(IElement source)
Description copied from interface: IConnection
Sets a new source element.

Specified by:
setSource in interface IConnection
Parameters:
source - new source element
See Also:
IConnection.setSource(org.evolvica.engine.IElement)

getTarget

public IElement getTarget()
Description copied from interface: IConnection
Returns the target element of this connection.

Specified by:
getTarget in interface IConnection
Returns:
target element
See Also:
IConnection.getTarget()

setTarget

public void setTarget(IElement target)
Description copied from interface: IConnection
Sets a new target element.

Specified by:
setTarget in interface IConnection
Parameters:
target - new target element
See Also:
IConnection.setTarget(org.evolvica.engine.IElement)

pushData

public void pushData(java.lang.Object data)
Description copied from interface: IConnection
Pushes a data object into this connection.

Specified by:
pushData in interface IConnection
Parameters:
data - data object
See Also:
IConnection.pushData(java.lang.Object)

hasData

public boolean hasData()
Description copied from interface: IConnection
Checks if there is a data object associated to this connection.

Specified by:
hasData in interface IConnection
Returns:
true if this connection contains some data object, false instead
See Also:
IConnection.hasData()

popData

public java.lang.Object popData()
Description copied from interface: IConnection
Retrieves a data object from this connection. The object is returned and removed from this connection.

Specified by:
popData in interface IConnection
Returns:
data object stored in this connection
See Also:
IConnection.popData()

getData

public java.lang.Object getData()
Description copied from interface: IConnection
Retrieves a data object from this connection without removing it.

Specified by:
getData in interface IConnection
Returns:
data object stored in this connection
See Also:
IConnection.getData()

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Specified by:
addPropertyChangeListener in interface IConnection

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Specified by:
removePropertyChangeListener in interface IConnection

firePropertyChangeEvent

public void firePropertyChangeEvent(java.beans.PropertyChangeEvent event)
Specified by:
firePropertyChangeEvent in interface IConnection

Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

Copyright © 2000-2004 Technical University of Ilmenau, Department Electronic Circuits and Systems