|
CSP for Java (JCSP) 1.1-rc2 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jcsp.util.ints.ZeroBufferInt
public class ZeroBufferInt
This is used to create a zero-buffered integer channel that never loses data.
create methods of ChannelInt 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 Form| Field Summary |
|---|
| Fields inherited from interface org.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. |
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. |
| 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 ChannelDataStoreIntpublic int startGet()
startGet in interface ChannelDataStoreIntpublic void endGet()
endGet in interface ChannelDataStoreIntendGetpublic 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 Object clone()
Note: Only the size and structure of the ZeroBufferInt is cloned, not any stored data.
clone in interface ChannelDataStoreIntclone in class Objectpublic void removeAll()
removeAll in interface ChannelDataStoreInt
|
CSP for Java (JCSP) 1.1-rc2 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||