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 ChannelDataStoreInt
public int startGet()
startGet
in interface ChannelDataStoreInt
ChannelDataStoreInt.endGet()
public void endGet()
endGet
in interface ChannelDataStoreInt
ChannelDataStoreInt.startGet()
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 java.lang.Object clone()
Note: Only the size and structure of the ZeroBufferInt is cloned, not any stored data.
clone
in interface ChannelDataStoreInt
clone
in class java.lang.Object
public void removeAll()
removeAll
in interface ChannelDataStoreInt
Copyright © 1996–2018. All rights reserved.