All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jcsp.util.BlackHole

java.lang.Object
   |
   +----jcsp.lang.ChannelDataStore
           |
           +----jcsp.util.BlackHole

public class BlackHole
extends ChannelDataStore

Description

The BlackHole is an ChannelDataStore which returns a null if read from and discards any data writen to it.

The BlackHole is always EMPTY and discards any Objects passed via put.

Author:
P.D.Austin

Constructor Index

 o BlackHole()

Method Index

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

Constructors

 o BlackHole
 public BlackHole()

Methods

 o get
 protected synchronized Object get()
Returns a null.

Returns:
null
Overrides:
get in class ChannelDataStore
 o put
 protected void put(Object object)
This method discards the Object.

Parameters:
The - object to put in the BlackHole
Overrides:
put in class ChannelDataStore
 o getState
 protected int getState()
Returns the current state of the BlackHole (always returns EMPTY)

Returns:
The current state of the BlackHole
Overrides:
getState in class ChannelDataStore
 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 ChannelDataStore

All Packages  Class Hierarchy  This Package  Previous  Next  Index