|
CSP for Java (JCSP) 1.0-rc7 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--jcsp.util.ints.OverFlowingBufferInt
This is used to create a buffered integer channel that always accepts input, discarding its last entered data if full.
create methods of One2OneChannelInt etc.
The getState method returns EMPTY or NONEMPTYFULL, but never FULL.
ZeroBufferInt,
BufferInt,
OverWriteOldestBufferInt,
OverWritingBufferInt,
InfiniteBufferInt,
One2OneChannelInt,
Any2OneChannelInt,
One2AnyChannelInt,
Any2AnyChannelInt, Serialized Form| Fields inherited from interface jcsp.util.ints.ChannelDataStoreInt |
EMPTY, FULL, NONEMPTYFULL |
| Constructor Summary | |
OverFlowingBufferInt(int size)
Construct a new OverFlowingBufferInt with the specified size. |
|
| Method Summary | |
Object |
clone()
Returns a new (and EMPTY) OverFlowingBufferInt with the same creation parameters as this one. |
int |
get()
Returns the oldest int from the OverFlowingBufferInt and removes it. |
int |
getState()
Returns the current state of the OverFlowingBufferInt. |
void |
put(int value)
Puts a new int into the OverFlowingBufferInt. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public OverFlowingBufferInt(int size)
size - the number of ints the OverFlowingBufferInt can store.BufferIntSizeError - if size is zero or negative. Note: no action
should be taken to try/catch this exception
- application code generating it is in error and needs correcting.| Method Detail |
public int get()
Pre-condition: getState must not currently return EMPTY.
get in interface ChannelDataStoreIntpublic void put(int value)
If OverFlowingBufferInt is full, the item is discarded.
put in interface ChannelDataStoreIntvalue - the int to put into the OverFlowingBufferIntpublic int getState()
getState in interface ChannelDataStoreIntpublic Object clone()
Note: Only the size and structure of the OverFlowingBufferInt is cloned, not any stored data.
clone in interface ChannelDataStoreIntclone in class Object
|
CSP for Java (JCSP) 1.0-rc7 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||