Package org.jcsp.lang
Class SharedChannelOutputIntImpl
- java.lang.Object
-
- org.jcsp.lang.SharedChannelOutputIntImpl
-
- All Implemented Interfaces:
ChannelOutputInt,Poisonable,SharedChannelOutputInt
class SharedChannelOutputIntImpl extends java.lang.Object implements SharedChannelOutputInt
-
-
Field Summary
Fields Modifier and Type Field Description private ChannelInternalsIntchannelprivate intimmunity
-
Constructor Summary
Constructors Constructor Description SharedChannelOutputIntImpl(ChannelInternalsInt _channel, int _immunity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidpoison(int strength)This injects poison into the channel.voidwrite(int object)Write an int to the channel.
-
-
-
Field Detail
-
channel
private ChannelInternalsInt channel
-
immunity
private int immunity
-
-
Constructor Detail
-
SharedChannelOutputIntImpl
SharedChannelOutputIntImpl(ChannelInternalsInt _channel, int _immunity)
-
-
Method Detail
-
write
public void write(int object)
Description copied from interface:ChannelOutputIntWrite an int to the channel.- Specified by:
writein interfaceChannelOutputInt- Parameters:
object- the integer to write to the channel
-
poison
public void poison(int strength)
Description copied from interface:PoisonableThis injects poison into the channel. If the channel was not explicitly constructed to be poisonable or if the strength of poison is not greater than the channel immunity level, the poison will have no effect.- Specified by:
poisonin interfacePoisonable- Parameters:
strength- the strength of the poison (must be >= 0).
-
-