Package org.jcsp.lang
Class ChannelInt
- java.lang.Object
-
- org.jcsp.lang.ChannelInt
-
public class ChannelInt extends java.lang.Object
Deprecated.To create integer channels, use the methods in the Channel class.This class provides static factory methods for constructing various different types of int channel objects. There are also methods for constructing arrays of identical int channels. The current implementation constructs "safe" channels which have separate delegate objects for their read and write ends. This stops aChannelInputInt
from being cast into aChannelOutputInt
object. TheSafeChannelIntFactory
class is used to construct the channels. Non-safe channels can be constructed by using an instance of theStandardChannelIntFactory
class. The channels produced by this factory have read and write ends implemented by the same object. This is is more efficient (there are two extra objects and delegate method calls) but could lead to errors if users make incorrect casts.- Author:
- Quickstone Technologies Limited
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Any2OneChannelInt[]
any2oneArray(int n)
Deprecated.Constructs and returns an array ofAny2OneChannelInt
objects.static Any2OneChannelInt[]
any2oneArray(ChannelDataStoreInt buffer, int n)
Deprecated.Constructs and returns an array ofAny2OneChannelInt
objects which use the specifiedChannelDataStoreInt
object as a buffer.static Any2AnyChannelInt
createAny2Any()
Deprecated.Constructs and returns anAny2AnyChannelInt
object.static Any2AnyChannelInt[]
createAny2Any(int n)
Deprecated.Constructs and returns an array ofAny2AnyChannelInt
objects.static Any2AnyChannelInt
createAny2Any(ChannelDataStoreInt buffer)
Deprecated.Constructs and returns aAny2AnyChannelInt
object which uses the specifiedChannelDataStoreInt
object as a buffer.static Any2AnyChannelInt[]
createAny2Any(ChannelDataStoreInt buffer, int n)
Deprecated.Constructs and returns an array ofAny2AnyChannelInt
objects which use the specifiedChannelDataStoreInt
object as a buffer.static Any2OneChannelInt
createAny2One()
Deprecated.Constructs and returns anAny2OneChannelInt
object.static Any2OneChannelInt
createAny2One(ChannelDataStoreInt buffer)
Deprecated.Constructs and returns aAny2OneChannelInt
object which uses the specifiedChannelDataStoreInt
object as a buffer.static One2AnyChannelInt
createOne2Any()
Deprecated.Constructs and returns aOne2AnyChannelInt
object.static One2AnyChannelInt[]
createOne2Any(int n)
Deprecated.Constructs and returns an array ofOne2AnyChannelInt
objects.static One2AnyChannelInt
createOne2Any(ChannelDataStoreInt buffer)
Deprecated.Constructs and returns aOne2AnyChannelInt
object which uses the specifiedChannelDataStoreInt
object as a buffer.static One2AnyChannelInt[]
createOne2Any(ChannelDataStoreInt buffer, int n)
Deprecated.Constructs and returns an array ofOne2AnyChannelInt
objects which use the specifiedChannelDataStoreInt
object as a buffer.static One2OneChannelInt
createOne2One()
Deprecated.Constructs and returns aOne2OneChannelInt
object.static One2OneChannelInt[]
createOne2One(int n)
Deprecated.Constructs and returns an array ofOne2OneChannelInt
objects.static One2OneChannelInt
createOne2One(ChannelDataStoreInt buffer)
Deprecated.Constructs and returns aOne2OneChannelInt
object which uses the specifiedChannelDataStoreInt
object as a buffer.static One2OneChannelInt[]
createOne2One(ChannelDataStoreInt buffer, int n)
Deprecated.Constructs and returns an array ofOne2OneChannelInt
objects which use the specifiedChannelDataStoreInt
object as a buffer.static SharedChannelInputInt[]
getInputArray(Any2AnyChannelInt[] c)
Deprecated.Constructs and returns an array of input channel ends, each of which can be shared by multiple concurrent readers.static AltingChannelInputInt[]
getInputArray(Any2OneChannelInt[] c)
Deprecated.Constructs and returns an array of input channel ends, each of which can be used as guards in anAlternative
.static SharedChannelInputInt[]
getInputArray(One2AnyChannelInt[] c)
Deprecated.Constructs and returns an array of input channel ends, each of which can be shared by multiple concurrent readers.static AltingChannelInputInt[]
getInputArray(One2OneChannelInt[] c)
Deprecated.Constructs and returns an array of input channel ends, each of which can be used as guards in anAlternative
.static SharedChannelOutputInt[]
getOutputArray(Any2AnyChannelInt[] c)
Deprecated.Constructs and returns an array of output channel ends, each of which can be shared by multiple concurrent writers.static SharedChannelOutputInt[]
getOutputArray(Any2OneChannelInt[] c)
Deprecated.Constructs and returns an array of output channel ends, each of which can be shared by multiple concurrent writers.static ChannelOutputInt[]
getOutputArray(One2AnyChannelInt[] c)
Deprecated.Constructs and returns an array of output channel ends, each of which can only be used by a single writer.static ChannelOutputInt[]
getOutputArray(One2OneChannelInt[] c)
Deprecated.Constructs and returns an array of output channel ends, each of which can only be used by a single writer.
-
-
-
Method Detail
-
createOne2One
public static One2OneChannelInt createOne2One()
Deprecated.Constructs and returns aOne2OneChannelInt
object.- Returns:
- the channel object.
- See Also:
ChannelIntFactory.createOne2One()
-
createAny2One
public static Any2OneChannelInt createAny2One()
Deprecated.Constructs and returns anAny2OneChannelInt
object.- Returns:
- the channel object.
- See Also:
ChannelIntFactory.createAny2One()
-
createOne2Any
public static One2AnyChannelInt createOne2Any()
Deprecated.Constructs and returns aOne2AnyChannelInt
object.- Returns:
- the channel object.
- See Also:
ChannelIntFactory.createOne2Any()
-
createAny2Any
public static Any2AnyChannelInt createAny2Any()
Deprecated.Constructs and returns anAny2AnyChannelInt
object.- Returns:
- the channel object.
- See Also:
ChannelIntFactory.createAny2Any()
-
createOne2One
public static One2OneChannelInt[] createOne2One(int n)
Deprecated.Constructs and returns an array ofOne2OneChannelInt
objects.- Parameters:
n
- the size of the array of channels.- Returns:
- the array of channels.
- See Also:
ChannelIntArrayFactory.createOne2One(int)
-
any2oneArray
public static Any2OneChannelInt[] any2oneArray(int n)
Deprecated.Constructs and returns an array ofAny2OneChannelInt
objects.- Parameters:
n
- the size of the array of channels.- Returns:
- the array of channels.
- See Also:
ChannelIntArrayFactory.createAny2One(int)
-
createOne2Any
public static One2AnyChannelInt[] createOne2Any(int n)
Deprecated.Constructs and returns an array ofOne2AnyChannelInt
objects.- Parameters:
n
- the size of the array of channels.- Returns:
- the array of channels.
- See Also:
ChannelIntArrayFactory.createOne2Any(int)
-
createAny2Any
public static Any2AnyChannelInt[] createAny2Any(int n)
Deprecated.Constructs and returns an array ofAny2AnyChannelInt
objects.- Parameters:
n
- the size of the array of channels.- Returns:
- the array of channels.
- See Also:
ChannelIntArrayFactory.createAny2Any(int)
-
createOne2One
public static One2OneChannelInt createOne2One(ChannelDataStoreInt buffer)
Deprecated.Constructs and returns aOne2OneChannelInt
object which uses the specifiedChannelDataStoreInt
object as a buffer.- Parameters:
buffer
- theChannelDataStoreInt
to use.- Returns:
- the buffered channel.
- See Also:
BufferedChannelIntFactory.createOne2One(ChannelDataStoreInt)
,ChannelDataStoreInt
-
createAny2One
public static Any2OneChannelInt createAny2One(ChannelDataStoreInt buffer)
Deprecated.Constructs and returns aAny2OneChannelInt
object which uses the specifiedChannelDataStoreInt
object as a buffer.- Parameters:
buffer
- theChannelDataStoreInt
to use.- Returns:
- the buffered channel.
- See Also:
BufferedChannelIntFactory.createAny2One(ChannelDataStoreInt)
,ChannelDataStoreInt
-
createOne2Any
public static One2AnyChannelInt createOne2Any(ChannelDataStoreInt buffer)
Deprecated.Constructs and returns aOne2AnyChannelInt
object which uses the specifiedChannelDataStoreInt
object as a buffer.- Parameters:
buffer
- theChannelDataStoreInt
to use.- Returns:
- the buffered channel.
- See Also:
BufferedChannelIntFactory.createOne2Any(ChannelDataStoreInt)
,ChannelDataStoreInt
-
createAny2Any
public static Any2AnyChannelInt createAny2Any(ChannelDataStoreInt buffer)
Deprecated.Constructs and returns aAny2AnyChannelInt
object which uses the specifiedChannelDataStoreInt
object as a buffer.- Parameters:
buffer
- theChannelDataStoreInt
to use.- Returns:
- the buffered channel.
- See Also:
BufferedChannelIntFactory.createAny2Any(ChannelDataStoreInt)
,ChannelDataStoreInt
-
createOne2One
public static One2OneChannelInt[] createOne2One(ChannelDataStoreInt buffer, int n)
Deprecated.Constructs and returns an array ofOne2OneChannelInt
objects which use the specifiedChannelDataStoreInt
object as a buffer.- Parameters:
buffer
- theChannelDataStoreInt
to use.n
- the size of the array of channels.- Returns:
- the array of buffered channels.
- See Also:
BufferedChannelIntArrayFactory.createOne2One(ChannelDataStoreInt, int)
,ChannelDataStoreInt
-
any2oneArray
public static Any2OneChannelInt[] any2oneArray(ChannelDataStoreInt buffer, int n)
Deprecated.Constructs and returns an array ofAny2OneChannelInt
objects which use the specifiedChannelDataStoreInt
object as a buffer.- Parameters:
buffer
- theChannelDataStoreInt
to use.n
- the size of the array of channels.- Returns:
- the array of buffered channels.
- See Also:
BufferedChannelIntArrayFactory.createAny2One(ChannelDataStoreInt, int)
,ChannelDataStoreInt
-
createOne2Any
public static One2AnyChannelInt[] createOne2Any(ChannelDataStoreInt buffer, int n)
Deprecated.Constructs and returns an array ofOne2AnyChannelInt
objects which use the specifiedChannelDataStoreInt
object as a buffer.- Parameters:
buffer
- theChannelDataStoreInt
to use.n
- the size of the array of channels.- Returns:
- the array of buffered channels.
- See Also:
BufferedChannelIntArrayFactory.createOne2Any(ChannelDataStoreInt, int)
,ChannelDataStoreInt
-
createAny2Any
public static Any2AnyChannelInt[] createAny2Any(ChannelDataStoreInt buffer, int n)
Deprecated.Constructs and returns an array ofAny2AnyChannelInt
objects which use the specifiedChannelDataStoreInt
object as a buffer.- Parameters:
buffer
- theChannelDataStoreInt
to use.n
- the size of the array of channels.- Returns:
- the array of buffered channels.
- See Also:
BufferedChannelIntArrayFactory.createAny2Any(ChannelDataStoreInt, int)
,ChannelDataStoreInt
-
getInputArray
public static SharedChannelInputInt[] getInputArray(Any2AnyChannelInt[] c)
Deprecated.Constructs and returns an array of input channel ends, each of which can be shared by multiple concurrent readers. The returned array,r
, is constructed such thatr[i] = c[i].in ()
for0 <= i < c.length
.- Parameters:
c
- the array of channel to obtain input ends from.- Returns:
- the array of channel input ends.
-
getInputArray
public static AltingChannelInputInt[] getInputArray(Any2OneChannelInt[] c)
Deprecated.Constructs and returns an array of input channel ends, each of which can be used as guards in anAlternative
. The returned array,r
, is constructed such thatr[i] = c[i].in ()
for0 <= i < c.length
.- Parameters:
c
- the array of channel to obtain input ends from.- Returns:
- the array of channel input ends.
-
getInputArray
public static SharedChannelInputInt[] getInputArray(One2AnyChannelInt[] c)
Deprecated.Constructs and returns an array of input channel ends, each of which can be shared by multiple concurrent readers. The returned array,r
, is constructed such thatr[i] = c[i].in ()
for0 <= i < c.length
.- Parameters:
c
- the array of channel to obtain input ends from.- Returns:
- the array of channel input ends.
-
getInputArray
public static AltingChannelInputInt[] getInputArray(One2OneChannelInt[] c)
Deprecated.Constructs and returns an array of input channel ends, each of which can be used as guards in anAlternative
. The returned array,r
, is constructed such thatr[i] = c[i].in ()
for0 <= i < c.length
.- Parameters:
c
- the array of channel to obtain input ends from.- Returns:
- the array of channel input ends.
-
getOutputArray
public static SharedChannelOutputInt[] getOutputArray(Any2AnyChannelInt[] c)
Deprecated.Constructs and returns an array of output channel ends, each of which can be shared by multiple concurrent writers. The returned array,r
, is constructed such thatr[i] = c[i].out ()
for0 <= i < c.length
.- Parameters:
c
- the array of channel to obtain output ends from.- Returns:
- the array of output input ends.
-
getOutputArray
public static SharedChannelOutputInt[] getOutputArray(Any2OneChannelInt[] c)
Deprecated.Constructs and returns an array of output channel ends, each of which can be shared by multiple concurrent writers. The returned array,r
, is constructed such thatr[i] = c[i].out ()
for0 <= i < c.length
.- Parameters:
c
- the array of channel to obtain output ends from.- Returns:
- the array of output input ends.
-
getOutputArray
public static ChannelOutputInt[] getOutputArray(One2AnyChannelInt[] c)
Deprecated.Constructs and returns an array of output channel ends, each of which can only be used by a single writer. The returned array,r
, is constructed such thatr[i] = c[i].out ()
for0 <= i < c.length
.- Parameters:
c
- the array of channel to obtain output ends from.- Returns:
- the array of output input ends.
-
getOutputArray
public static ChannelOutputInt[] getOutputArray(One2OneChannelInt[] c)
Deprecated.Constructs and returns an array of output channel ends, each of which can only be used by a single writer. The returned array,r
, is constructed such thatr[i] = c[i].out ()
for0 <= i < c.length
.- Parameters:
c
- the array of channel to obtain output ends from.- Returns:
- the array of output input ends.
-
-