📄 channelofstring.java
字号:
package uk.co.brainycreatures.jpascal.type;
import jcsp.lang.*;
/**
* represents a channel that writes and reads
* Strings to and from a channel
* @author Fidel Viegas (viegasfh@hotmail.com)
*/
public class ChannelOfString extends One2OneChannel {
/**
* writes a string value to the channel;
*/
public void send(String value) {
write(value); // write the value as an string object
}
/**
* returns the string written to the channel
*/
public String receive() {
return (String) read(); // return the string value
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -