|
CSP for Java (JCSP) 1.0-rc4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jcsp.util.ints.ZeroBufferInt
This is used to create a zero-buffered integer channel that never loses data.
create
methods of One2OneChannelInt
etc.
The getState method will return FULL if there is an output waiting on the channel and EMPTY if there is not.
BufferInt
,
OverWriteOldestBufferInt
,
OverWritingBufferInt
,
OverFlowingBufferInt
,
InfiniteBufferInt
,
One2OneChannelInt
,
Any2OneChannelInt
,
One2AnyChannelInt
,
Any2AnyChannelInt
, Serialized FormFields inherited from interface jcsp.util.ints.ChannelDataStoreInt |
EMPTY, FULL, NONEMPTYFULL |
Constructor Summary | |
ZeroBufferInt()
|
Method Summary | |
Object |
clone()
Returns a new (and EMPTY) ZeroBufferInt with the same creation parameters as this one. |
int |
get()
Returns the int from the ZeroBufferInt. |
int |
getState()
Returns the current state of the ZeroBufferInt. |
void |
put(int value)
Puts a new int into the ZeroBufferInt. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ZeroBufferInt()
Method Detail |
public int get()
Pre-condition: getState must not currently return EMPTY.
get
in interface ChannelDataStoreInt
public void put(int value)
Pre-condition: getState must not currently return FULL.
put
in interface ChannelDataStoreInt
value
- the int to put into the ZeroBufferIntpublic int getState()
getState
in interface ChannelDataStoreInt
public Object clone()
Note: Only the size and structure of the ZeroBufferInt is cloned, not any stored data.
clone
in interface ChannelDataStoreInt
clone
in class Object
|
CSP for Java (JCSP) 1.0-rc4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |