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

Constructor Index

 o BlackHoleInt()

Method Index

 o clone()
Returns a new Object with the same creation parameters as this Object.
 o get()
Returns a 0.
 o getState()
Returns the current state of the BlackHoleInt (always returns EMPTY)
 o put(int)
This method discards the int.

Constructors

 o BlackHoleInt
 public BlackHoleInt()

Methods

 o get
 protected synchronized int get()
Returns a 0.

Returns:
0
Overrides:
get in class ChannelDataStoreInt
 o put
 protected void put(int value)
This method discards the int.

Parameters:
The - int to put in the BlackHole
Overrides:
put in class ChannelDataStoreInt
 o 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
 o 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