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