fi.helsinki.dacopan.model
Class Link

java.lang.Object
  extended by fi.helsinki.dacopan.model.Link
All Implemented Interfaces:
Identifiable

public class Link
extends java.lang.Object
implements Identifiable

A network link between two hosts.

Version:
$Id: Link.java,v 1.2 2004/05/07 09:19:42 aarniala-dacopan Exp $

Field Summary
protected  Host first
          first host
protected  long id
          unique link id
protected  Host second
          second host
protected  java.util.List staticVariables
          list of static variables associated with this link
 
Constructor Summary
Link(long id, Host first, Host second)
          Creates a link with the given values.
Link(long id, Host first, Host second, java.util.List staticVariables)
          Creates a link with the given values and static variables.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 Host getFirst()
           
 long getId()
          Returns the unique identifier of this object.
 Host getSecond()
           
 java.util.List getStaticVariables()
          Returns a non-null list of static variables associated with this link.
 void setStaticVariables(java.util.List staticVariables)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected long id
unique link id


first

protected Host first
first host


second

protected Host second
second host


staticVariables

protected java.util.List staticVariables
list of static variables associated with this link

Constructor Detail

Link

public Link(long id,
            Host first,
            Host second)
Creates a link with the given values.


Link

public Link(long id,
            Host first,
            Host second,
            java.util.List staticVariables)
Creates a link with the given values and static variables.

Method Detail

getId

public long getId()
Description copied from interface: Identifiable
Returns the unique identifier of this object.

Specified by:
getId in interface Identifiable
Returns:
a unique long id

getFirst

public Host getFirst()

getSecond

public Host getSecond()

getStaticVariables

public java.util.List getStaticVariables()
Returns a non-null list of static variables associated with this link.


setStaticVariables

public void setStaticVariables(java.util.List staticVariables)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


© Dacopan2 team, 2005-