public class ZeroBufferInt extends java.lang.Object implements ChannelDataStoreInt, java.io.Serializable
Channel
(Channel.one2oneInt(org.jcsp.util.ints.ChannelDataStoreInt) 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,
ChannelInt,
Serialized FormEMPTY, FULL, NONEMPTYFULL| Constructor and Description |
|---|
ZeroBufferInt() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Returns a new (and EMPTY) ZeroBufferInt with the same
creation parameters as this one.
|
void |
endGet()
Ends the extended rendezvous by clearing the buffer.
|
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.
|
void |
removeAll() |
int |
startGet()
Begins an extended rendezvous - simply returns the next integer in the buffer.
|
public int get()
Pre-condition: getState must not currently return EMPTY.
get in interface ChannelDataStoreIntpublic int startGet()
startGet in interface ChannelDataStoreIntChannelDataStoreInt.endGet()public void endGet()
endGet in interface ChannelDataStoreIntChannelDataStoreInt.startGet()public void put(int value)
Pre-condition: getState must not currently return FULL.
put in interface ChannelDataStoreIntvalue - the int to put into the ZeroBufferIntpublic int getState()
getState in interface ChannelDataStoreIntpublic java.lang.Object clone()
Note: Only the size and structure of the ZeroBufferInt is cloned, not any stored data.
clone in interface ChannelDataStoreIntclone in class java.lang.Objectpublic void removeAll()
removeAll in interface ChannelDataStoreIntCopyright © 1996–2019. All rights reserved.