All Packages Class Hierarchy This Package Previous Next Index
Class jcsp.util.ints.BlackHoleInt
java.lang.Object
|
+----jcsp.lang.ints.ChannelDataStoreInt
|
+----jcsp.util.ints.BlackHoleInt
- public class BlackHoleInt
- extends ChannelDataStoreInt
Description
The BlackHoleInt is an ChannelDataStoreInt which returns a 0 if read from
and discards any data writen to it.
The BlackHoleInt is always EMPTY and discards any ints passed via put.
- Author:
- P.D.Austin
-
BlackHoleInt()
-
-
clone()
- Returns a new Object with the same creation parameters as this Object.
-
get()
- Returns a 0.
-
getState()
- Returns the current state of the BlackHoleInt (always returns EMPTY)
-
put(int)
- This method discards the int.
BlackHoleInt
public BlackHoleInt()
get
protected synchronized int get()
- Returns a 0.
- Returns:
- 0
- Overrides:
- get in class ChannelDataStoreInt
put
protected void put(int value)
- This method discards the int.
- Parameters:
- The - int to put in the BlackHole
- Overrides:
- put in class ChannelDataStoreInt
getState
protected int getState()
- Returns the current state of the BlackHoleInt (always returns EMPTY)
- Returns:
- The current state of the BlackHoleInt
- Overrides:
- getState in class ChannelDataStoreInt
clone
protected Object clone()
- Returns a new Object with the same creation parameters as this Object.
This method should be overridden by subclasses to return a new Object
that is the same type as this Object. The new instance should be created
by constructing a new instance with the same parameters as the original.
NOTE: Only the sizes of the data should be cloned not the stored data.
- Returns:
- The cloned instance of this Object.
- Overrides:
- clone in class ChannelDataStoreInt
All Packages Class Hierarchy This Package Previous Next Index