Class ProgramCodeGeneratorAdapter.Channel

  • Enclosing class:
    ProgramCodeGeneratorAdapter

    public static class ProgramCodeGeneratorAdapter.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

      Fields 
      Modifier and Type Field Description
      int channelNumber
      The channel number of this channel.
      IOPort port
      The port that contains this channel.
    • Constructor Summary

      Constructors 
      Constructor Description
      Channel​(IOPort portObject, int channel)
      Construct the channel with the given port and channel number.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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

      • 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:
        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.