fi.helsinki.dacopan.model
Class Protocol

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

public class Protocol
extends java.lang.Object
implements Identifiable

A network protocol.

Version:
$Id: Protocol.java,v 1.10 2005/05/02 11:18:59 mjvaanan Exp $

Field Summary
protected  long id
          unique identifier
protected  Layer layer
          network layer to which the protocol belongs to
protected  java.lang.String name
          name of the protocol
protected  java.util.List staticVariables
          list of static variables
protected  java.util.List variables
          list of variable definitions
 
Constructor Summary
Protocol(long id, java.lang.String name, Layer layer)
          Creates a protocol with the given id, name and network layer.
Protocol(long id, java.lang.String name, Layer layer, java.util.List variables, java.util.List staticVariables)
          Creates a protocol with the given values and variables.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 long getId()
          Returns the unique identifier of this object.
 Layer getLayer()
           
 java.lang.String getName()
           
 java.lang.String getRawName()
           
 java.util.List getStaticVariables()
          Returns any static variables associated with this protocol.
 java.util.List getVariables()
          Returns any variable definitions associated with this protocol.
 void setStaticVariables(java.util.List staticVariables)
           
 void setVariables(java.util.List variables)
           
 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 identifier


name

protected java.lang.String name
name of the protocol


layer

protected Layer layer
network layer to which the protocol belongs to


variables

protected java.util.List variables
list of variable definitions


staticVariables

protected java.util.List staticVariables
list of static variables

Constructor Detail

Protocol

public Protocol(long id,
                java.lang.String name,
                Layer layer)
Creates a protocol with the given id, name and network layer.


Protocol

public Protocol(long id,
                java.lang.String name,
                Layer layer,
                java.util.List variables,
                java.util.List staticVariables)
Creates a protocol with the given values and 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

getLayer

public Layer getLayer()

getName

public java.lang.String getName()

getRawName

public java.lang.String getRawName()

getVariables

public java.util.List getVariables()
Returns any variable definitions associated with this protocol.


setVariables

public void setVariables(java.util.List variables)

getStaticVariables

public java.util.List getStaticVariables()
Returns any static variables associated with this protocol.


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-