ptolemy.codegen.kernel
Class CodeGeneratorHelper.Channel

java.lang.Object
  extended by ptolemy.codegen.kernel.CodeGeneratorHelper.Channel
Enclosing class:
CodeGeneratorHelper

public static class CodeGeneratorHelper.Channel
extends java.lang.Object

A class that defines a channel object. A channel object is specified by its port and its channel index in that port.


Field Summary
 int channelNumber
          The channel number of this channel.
 IOPort port
          The port that contains this channel.
 
Constructor Summary
CodeGeneratorHelper.Channel(IOPort portObject, int channel)
          Construct the channel with the given port and channel number.
 
Method Summary
 boolean equals(java.lang.Object object)
          Whether this channel is the same as the given object.
 int hashCode()
          Return the hash code for this channel.
 java.lang.String toString()
          Return the string representation of this channel.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

port

public IOPort port
The port that contains this channel.


channelNumber

public int channelNumber
The channel number of this channel.

Constructor Detail

CodeGeneratorHelper.Channel

public CodeGeneratorHelper.Channel(IOPort portObject,
                                   int channel)
Construct the channel with the given port and channel number.

Parameters:
portObject - The given port.
channel - The channel number of this object in the given port.
Method Detail

equals

public boolean equals(java.lang.Object object)
Whether this channel is the same as the given object.

Overrides:
equals in class java.lang.Object
Parameters:
object - The given object.
Returns:
True if this channel is the same reference as the given object, otherwise false;

hashCode

public int hashCode()
Return the hash code for this channel. Implementing this method is required for comparing the equality of channels.

Overrides:
hashCode in class java.lang.Object
Returns:
Hash code for this channel.

toString

public java.lang.String toString()
Return the string representation of this channel.

Overrides:
toString in class java.lang.Object
Returns:
The string representation of this channel.