Class ProgramCodeGeneratorAdapter.Channel
- java.lang.Object
-
- ptolemy.cg.kernel.generic.program.ProgramCodeGeneratorAdapter.Channel
-
- Enclosing class:
- ProgramCodeGeneratorAdapter
public static class ProgramCodeGeneratorAdapter.Channel extends java.lang.ObjectA class that defines a channel object. A channel object is specified by its port and its channel index in that port.
-
-
Field Summary
Fields Modifier and Type Field Description intchannelNumberThe channel number of this channel.IOPortportThe port that contains this channel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object object)Whether this channel is the same as the given object.inthashCode()Return the hash code for this channel.java.lang.StringtoString()Return the string representation of this channel.
-
-
-
Field Detail
-
port
public IOPort port
The port that contains this channel.
-
channelNumber
public int channelNumber
The channel number of this channel.
-
-
Constructor Detail
-
Channel
public 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:
equalsin classjava.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:
hashCodein classjava.lang.Object- Returns:
- Hash code for this channel.
-
toString
public java.lang.String toString()
Return the string representation of this channel.- Overrides:
toStringin classjava.lang.Object- Returns:
- The string representation of this channel.
-
-