All Packages Class Hierarchy This Package Previous Next Index
The ChannelOutputInt interface should be used to hold references to ChannelInts when they are only going to be used for writing data to. By using the ChannelOutputInt interface any attempt to read from the ChannelInt using the reference to a ChannelOutputInt type will generate a compile time error. The following code fragment would not compile.
int doRead(ChannelOutputInt c) { return c.read(); // illegalThis interface should be used to pass ChannelInts around where processes only require read access to the ChannelInt.
void doWrite(ChannelOutputInt c, int i) { c.write(i); }
public abstract void write(int i)
All Packages Class Hierarchy This Package Previous Next Index