Package org.jcsp.lang

Class Channel


  • public class Channel
    extends java.lang.Object

    This class provides static factory methods for constructing all the different types of channel.

    Channels carry either Objects or integers.

    Basic channels are zero-buffered: the writer and reader processes must synchronise. Buffered channels can be made with various buffering policies: e.g. fixed size blocking FIFO (here), fixed size overwrite-oldest-when-full (here), fixed size discard-when-full (here), infinite sized FIFO (here).

    Channels can be made Poisonable with user-chosen immunity (for the simple and safe shutdown of networks or sub-networks).

    Channels are either one-one (connecting a single writer process with a single reader), one-any (connecting a single writer process with any number of readers), any-one (connecting any number of writer processes with a single reader) or any-any (connecting any number of writer processes with any number of readers). Do not misuse them (e.g. use a one-one to connect more than one writer process to more than one reader).

    Channels are used to construct process networks. Channel ends, obtained from a channel via its in() and out() methods, should be plugged into the processes that need them. An input-end is used for reading from the channel; an output-end is used for writing to the channel. A process should not be given a whole channel – only the end that it needs.

    Channel input-ends of one-one and any-one channels may be used as guards in a choice. Channel input-ends of one-any or any-any channels may not be so used.

    Channel output-ends of one-one symmetric channels may also be used as guards in a choice. Channel output-ends of all other kinds of channel may not. Symmetric channels are currently an experiment: buffering and poisoning are not yet supported.

    For convenience, there are also methods for constructing arrays of channels (and for extracting arrays of channel-ends from arrays of channels).

    Author:
    P.H. Welch
    • Method Detail

      • one2one

        public static One2OneChannel one2one()
        This constructs an Object carrying channel that may only be connected to one writer and one reader process at a time. The channel is zero-buffered – the writer and reader processes must synchronise.
        Returns:
        the channel.
      • one2any

        public static One2AnyChannel one2any()
        This constructs an Object carrying channel that may only be connected to one writer at a time, but any number of reader processes. The readers contend safely with each other to take the next message. Each message flows from the writer to just one of the readers – this is not a broadcasting channel. The channel is zero-buffered – the writer and reader processes must synchronise.
        Returns:
        the channel.
      • any2one

        public static Any2OneChannel any2one()
        This constructs an Object carrying channel that may be connected to any number of writer processes, but only one reader at a time. The writers contend safely with each other to send the next message. Each message flows from just one of the writers to the reader – this is not a combining channel. The channel is zero-buffered – the writer and reader processes must synchronise.
        Returns:
        the channel.
      • any2any

        public static Any2AnyChannel any2any()
        This constructs an Object carrying channel that may be connected to any number of writer processes and any number of reader processes. The writers contend safely with each other to send the next message. The readers contend safely with each other to take the next message. Each message flows from just one of the writers to just one of the readers – this is not a broadcasting-and-combining channel. The channel is zero-buffered – the writer and reader processes must synchronise.
        Returns:
        the channel.
      • one2one

        public static One2OneChannel one2one​(ChannelDataStore buffer)
        This constructs a one-one Object channel with user chosen buffering size and policy.
        Parameters:
        buffer - defines size and policy (the channel will clone its own).
        Returns:
        the channel.
      • one2any

        public static One2AnyChannel one2any​(ChannelDataStore buffer)
        This constructs a one-any Object channel with user chosen buffering size and policy.
        Parameters:
        buffer - defines size and policy (the channel will clone its own).
        Returns:
        the channel.
      • any2one

        public static Any2OneChannel any2one​(ChannelDataStore buffer)
        This constructs an any-one Object channel with user chosen buffering size and policy.
        Parameters:
        buffer - defines size and policy (the channel will clone its own).
        Returns:
        the channel.
      • any2any

        public static Any2AnyChannel any2any​(ChannelDataStore buffer)
        This constructs an any-any Object channel with user chosen buffering size and policy.
        Parameters:
        buffer - defines size and policy (the channel will clone its own).
        Returns:
        the channel.
      • one2one

        public static One2OneChannel one2one​(int immunity)
        This constructs a poisonable one-one Object channel.
        Parameters:
        immunity - the channel is immune to poison strengths up to and including this level.
        Returns:
        the channel.
      • one2any

        public static One2AnyChannel one2any​(int immunity)
        This constructs a poisonable one-any Object channel.
        Parameters:
        immunity - the channel is immune to poison strengths up to and including this level.
        Returns:
        the channel.
      • any2one

        public static Any2OneChannel any2one​(int immunity)
        This constructs a poisonable any-one Object channel.
        Parameters:
        immunity - the channel is immune to poison strengths up to and including this level.
        Returns:
        the channel.
      • any2any

        public static Any2AnyChannel any2any​(int immunity)
        This constructs a poisonable any-any Object channel.
        Parameters:
        immunity - the channel is immune to poison strengths up to and including this level.
        Returns:
        the channel.
      • one2one

        public static One2OneChannel one2one​(ChannelDataStore buffer,
                                             int immunity)
        This constructs a buffered poisonable one-one Object channel.
        Parameters:
        buffer - defines size and policy (the channel will clone its own).
        immunity - the channel is immune to poison strengths up to and including this level.
        Returns:
        the channel.
      • one2any

        public static One2AnyChannel one2any​(ChannelDataStore buffer,
                                             int immunity)
        This constructs a buffered poisonable one-any Object channel.
        Parameters:
        buffer - defines size and policy (the channel will clone its own).
        immunity - the channel is immune to poison strengths up to and including this level.
        Returns:
        the channel.
      • any2one

        public static Any2OneChannel any2one​(ChannelDataStore buffer,
                                             int immunity)
        This constructs a buffered poisonable any-one Object channel.
        Parameters:
        buffer - defines size and policy (the channel will clone its own).
        immunity - the channel is immune to poison strengths up to and including this level.
        Returns:
        the channel.
      • any2any

        public static Any2AnyChannel any2any​(ChannelDataStore buffer,
                                             int immunity)
        This constructs a buffered poisonable any-any Object channel.
        Parameters:
        buffer - defines size and policy (the channel will clone its own).
        immunity - the channel is immune to poison strengths up to and including this level.
        Returns:
        the channel.
      • one2oneArray

        public static One2OneChannel[] one2oneArray​(int size)
        This constructs an array of one-one Object channels.
        Parameters:
        size - defines size of the array (must be positive).
        Returns:
        the channel array.
      • one2anyArray

        public static One2AnyChannel[] one2anyArray​(int size)
        This constructs an array of one-any Object channels.
        Parameters:
        size - defines size of the array (must be positive).
        Returns:
        the channel array.
      • any2oneArray

        public static Any2OneChannel[] any2oneArray​(int size)
        This constructs an array of any-one Object channels.
        Parameters:
        size - defines size of the array (must be positive).
        Returns:
        the channel array.
      • any2anyArray

        public static Any2AnyChannel[] any2anyArray​(int size)
        This constructs an array of any-any Object channels.
        Parameters:
        size - defines size of the array (must be positive).
        Returns:
        the channel array.
      • one2oneArray

        public static One2OneChannel[] one2oneArray​(int size,
                                                    int immunity)
        This constructs an array of poisonable one-one Object channels.
        Parameters:
        size - defines size of the array (must be positive).
        immunity - the channels are immune to poison strengths up to and including this level.
        Returns:
        the channel array.
      • one2anyArray

        public static One2AnyChannel[] one2anyArray​(int size,
                                                    int immunity)
        This constructs an array of poisonable one-any Object channels.
        Parameters:
        size - defines size of the array (must be positive).
        immunity - the channels are immune to poison strengths up to and including this level.
        Returns:
        the channel array.
      • any2oneArray

        public static Any2OneChannel[] any2oneArray​(int size,
                                                    int immunity)
        This constructs an array of poisonable any-one Object channels.
        Parameters:
        size - defines size of the array (must be positive).
        immunity - the channels are immune to poison strengths up to and including this level.
        Returns:
        the channel array.
      • any2anyArray

        public static Any2AnyChannel[] any2anyArray​(int size,
                                                    int immunity)
        This constructs an array of poisonable any-any Object channels.
        Parameters:
        size - defines size of the array (must be positive).
        immunity - the channels are immune to poison strengths up to and including this level.
        Returns:
        the channel array.
      • one2oneArray

        public static One2OneChannel[] one2oneArray​(int size,
                                                    ChannelDataStore buffer)
        This constructs an array of buffered one-one Object channels.
        Parameters:
        size - defines size of the array (must be positive).
        buffer - defines size and policy (the channel will clone its own).
        Returns:
        the channel array.
      • one2anyArray

        public static One2AnyChannel[] one2anyArray​(int size,
                                                    ChannelDataStore buffer)
        This constructs an array of buffered one-any Object channels.
        Parameters:
        size - defines size of the array (must be positive).
        buffer - defines size and policy (the channel will clone its own).
        Returns:
        the channel array.
      • any2oneArray

        public static Any2OneChannel[] any2oneArray​(int size,
                                                    ChannelDataStore buffer)
        This constructs an array of buffered any-one Object channels.
        Parameters:
        size - defines size of the array (must be positive).
        buffer - defines size and policy (the channel will clone its own).
        Returns:
        the channel array.
      • any2anyArray

        public static Any2AnyChannel[] any2anyArray​(int size,
                                                    ChannelDataStore buffer)
        This constructs an array of buffered any-any Object channels.
        Parameters:
        size - defines size of the array (must be positive).
        buffer - defines size and policy (the channel will clone its own).
        Returns:
        the channel array.
      • one2oneArray

        public static One2OneChannel[] one2oneArray​(int size,
                                                    ChannelDataStore buffer,
                                                    int immunity)
        This constructs an array of buffered poisonable one-one Object channels.
        Parameters:
        size - defines size of the array (must be positive).
        buffer - defines size and policy (the channel will clone its own).
        immunity - the channels are immune to poison strengths up to and including this level.
        Returns:
        the channel array.
      • one2anyArray

        public static One2AnyChannel[] one2anyArray​(int size,
                                                    ChannelDataStore buffer,
                                                    int immunity)
        This constructs an array of buffered poisonable one-any Object channels.
        Parameters:
        size - defines size of the array (must be positive).
        buffer - defines size and policy (the channel will clone its own).
        immunity - the channels are immune to poison strengths up to and including this level.
        Returns:
        the channel array.
      • any2oneArray

        public static Any2OneChannel[] any2oneArray​(int size,
                                                    ChannelDataStore buffer,
                                                    int immunity)
        This constructs an array of buffered poisonable any-one Object channels.
        Parameters:
        size - defines size of the array (must be positive).
        buffer - defines size and policy (the channel will clone its own).
        immunity - the channels are immune to poison strengths up to and including this level.
        Returns:
        the channel array.
      • any2anyArray

        public static Any2AnyChannel[] any2anyArray​(int size,
                                                    ChannelDataStore buffer,
                                                    int immunity)
        This constructs an array of buffered poisonable any-any Object channels.
        Parameters:
        size - defines size of the array (must be positive).
        buffer - defines size and policy (the channel will clone its own).
        immunity - the channels are immune to poison strengths up to and including this level.
        Returns:
        the channel array.
      • one2oneSymmetric

        public static One2OneChannelSymmetric one2oneSymmetric()
        This constructs an Object carrying channel that may only be connected to one writer and one reader process at a time. The channel is zero-buffered – the writer and reader processes must synchronise.

        The symmetry relates to the use of the channel's ends as guards in an Alternative: both ends may be so used.

        Returns:
        the channel.
      • one2oneSymmetricArray

        public static One2OneChannelSymmetric[] one2oneSymmetricArray​(int size)
        This constructs an array of symmetric one-one Object channels.
        Parameters:
        size - defines size of the array (must be positive).
        Returns:
        the channel array.
      • one2oneInt

        public static One2OneChannelInt one2oneInt()
        This constructs an integer carrying channel that may only be connected to one writer and one reader process at a time. The channel is zero-buffered – the writer and reader processes must synchronise.
        Returns:
        the channel.
      • one2anyInt

        public static One2AnyChannelInt one2anyInt()
        This constructs an integer carrying channel that may only be connected to one writer at a time, but any number of reader processes. The readers contend safely with each other to take the next message. Each message flows from the writer to just one of the readers – this is not a broadcasting channel. The channel is zero-buffered – the writer and reader processes must synchronise.
        Returns:
        the channel.
      • any2oneInt

        public static Any2OneChannelInt any2oneInt()
        This constructs an integer carrying channel that may be connected to any number of writer processes, but only one reader at a time. The writers contend safely with each other to send the next message. Each message flows from just one of the writers to the reader – this is not a combining channel. The channel is zero-buffered – the writer and reader processes must synchronise.
        Returns:
        the channel.
      • any2anyInt

        public static Any2AnyChannelInt any2anyInt()
        This constructs an integer carrying channel that may be connected to any number of writer processes and any number of reader processes. The writers contend safely with each other to send the next message. The readers contend safely with each other to take the next message. Each message flows from just one of the writers to just one of the readers – this is not a broadcasting-and-combining channel. The channel is zero-buffered – the writer and reader processes must synchronise.
        Returns:
        the channel.
      • one2oneInt

        public static One2OneChannelInt one2oneInt​(ChannelDataStoreInt buffer)
        This constructs a one-one integer channel with user chosen buffering size and policy.
        Parameters:
        buffer - defines size and policy (the channel will clone its own).
        Returns:
        the channel.
      • one2anyInt

        public static One2AnyChannelInt one2anyInt​(ChannelDataStoreInt buffer)
        This constructs a one-any integer channel with user chosen buffering size and policy.
        Parameters:
        buffer - defines size and policy (the channel will clone its own).
        Returns:
        the channel.
      • any2oneInt

        public static Any2OneChannelInt any2oneInt​(ChannelDataStoreInt buffer)
        This constructs an any-one integer channel with user chosen buffering size and policy.
        Parameters:
        buffer - defines size and policy (the channel will clone its own).
        Returns:
        the channel.
      • any2anyInt

        public static Any2AnyChannelInt any2anyInt​(ChannelDataStoreInt buffer)
        This constructs an any-any integer channel with user chosen buffering size and policy.
        Parameters:
        buffer - defines size and policy (the channel will clone its own).
        Returns:
        the channel.
      • one2oneInt

        public static One2OneChannelInt one2oneInt​(int immunity)
        This constructs a poisonable one-one integer channel.
        Parameters:
        immunity - the channel is immune to poison strengths up to and including this level.
        Returns:
        the channel.
      • one2anyInt

        public static One2AnyChannelInt one2anyInt​(int immunity)
        This constructs a poisonable one-any integer channel.
        Parameters:
        immunity - the channel is immune to poison strengths up to and including this level.
        Returns:
        the channel.
      • any2oneInt

        public static Any2OneChannelInt any2oneInt​(int immunity)
        This constructs a poisonable any-one integer channel.
        Parameters:
        immunity - the channel is immune to poison strengths up to and including this level.
        Returns:
        the channel.
      • any2anyInt

        public static Any2AnyChannelInt any2anyInt​(int immunity)
        This constructs a poisonable any-any integer channel.
        Parameters:
        immunity - the channel is immune to poison strengths up to and including this level.
        Returns:
        the channel.
      • one2oneInt

        public static One2OneChannelInt one2oneInt​(ChannelDataStoreInt buffer,
                                                   int immunity)
        This constructs a buffered poisonable one-one integer channel.
        Parameters:
        buffer - defines size and policy (the channel will clone its own).
        immunity - the channel is immune to poison strengths up to and including this level.
        Returns:
        the channel.
      • one2anyInt

        public static One2AnyChannelInt one2anyInt​(ChannelDataStoreInt buffer,
                                                   int immunity)
        This constructs a buffered poisonable one-any integer channel.
        Parameters:
        buffer - defines size and policy (the channel will clone its own).
        immunity - the channel is immune to poison strengths up to and including this level.
        Returns:
        the channel.
      • any2oneInt

        public static Any2OneChannelInt any2oneInt​(ChannelDataStoreInt buffer,
                                                   int immunity)
        This constructs a buffered poisonable any-one integer channel.
        Parameters:
        buffer - defines size and policy (the channel will clone its own).
        immunity - the channel is immune to poison strengths up to and including this level.
        Returns:
        the channel.
      • any2anyInt

        public static Any2AnyChannelInt any2anyInt​(ChannelDataStoreInt buffer,
                                                   int immunity)
        This constructs a buffered poisonable any-any integer channel.
        Parameters:
        buffer - defines size and policy (the channel will clone its own).
        immunity - the channel is immune to poison strengths up to and including this level.
        Returns:
        the channel.
      • one2oneIntArray

        public static One2OneChannelInt[] one2oneIntArray​(int size)
        This constructs an array of one-one integer channels.
        Parameters:
        size - defines size of the array (must be positive).
        Returns:
        the channel array.
      • one2anyIntArray

        public static One2AnyChannelInt[] one2anyIntArray​(int size)
        This constructs an array of one-any integer channels.
        Parameters:
        size - defines size of the array (must be positive).
        Returns:
        the channel array.
      • any2oneIntArray

        public static Any2OneChannelInt[] any2oneIntArray​(int size)
        This constructs an array of any-one integer channels.
        Parameters:
        size - defines size of the array (must be positive).
        Returns:
        the channel array.
      • any2anyIntArray

        public static Any2AnyChannelInt[] any2anyIntArray​(int size)
        This constructs an array of any-any integer channels.
        Parameters:
        size - defines size of the array (must be positive).
        Returns:
        the channel array.
      • one2oneIntArray

        public static One2OneChannelInt[] one2oneIntArray​(int size,
                                                          int immunity)
        This constructs an array of poisonable one-one integer channels.
        Parameters:
        size - defines size of the array (must be positive).
        immunity - the channels are immune to poison strengths up to and including this level.
        Returns:
        the channel array.
      • one2anyIntArray

        public static One2AnyChannelInt[] one2anyIntArray​(int size,
                                                          int immunity)
        This constructs an array of poisonable one-any integer channels.
        Parameters:
        size - defines size of the array (must be positive).
        immunity - the channels are immune to poison strengths up to and including this level.
        Returns:
        the channel array.
      • any2oneIntArray

        public static Any2OneChannelInt[] any2oneIntArray​(int size,
                                                          int immunity)
        This constructs an array of poisonable any-one integer channels.
        Parameters:
        size - defines size of the array (must be positive).
        immunity - the channels are immune to poison strengths up to and including this level.
        Returns:
        the channel array.
      • any2anyIntArray

        public static Any2AnyChannelInt[] any2anyIntArray​(int size,
                                                          int immunity)
        This constructs an array of poisonable any-any integer channels.
        Parameters:
        size - defines size of the array (must be positive).
        immunity - the channels are immune to poison strengths up to and including this level.
        Returns:
        the channel array.
      • one2oneIntArray

        public static One2OneChannelInt[] one2oneIntArray​(int size,
                                                          ChannelDataStoreInt buffer)
        This constructs an array of buffered one-one integer channels.
        Parameters:
        size - defines size of the array (must be positive).
        buffer - defines size and policy (the channel will clone its own).
        Returns:
        the channel array.
      • one2anyIntArray

        public static One2AnyChannelInt[] one2anyIntArray​(int size,
                                                          ChannelDataStoreInt buffer)
        This constructs an array of buffered one-any integer channels.
        Parameters:
        size - defines size of the array (must be positive).
        buffer - defines size and policy (the channel will clone its own).
        Returns:
        the channel array.
      • any2oneIntArray

        public static Any2OneChannelInt[] any2oneIntArray​(int size,
                                                          ChannelDataStoreInt buffer)
        This constructs an array of buffered any-one integer channels.
        Parameters:
        size - defines size of the array (must be positive).
        buffer - defines size and policy (the channel will clone its own).
        Returns:
        the channel array.
      • any2anyIntArray

        public static Any2AnyChannelInt[] any2anyIntArray​(int size,
                                                          ChannelDataStoreInt buffer)
        This constructs an array of buffered any-any integer channels.
        Parameters:
        size - defines size of the array (must be positive).
        buffer - defines size and policy (the channel will clone its own).
        Returns:
        the channel array.
      • one2oneIntArray

        public static One2OneChannelInt[] one2oneIntArray​(int size,
                                                          ChannelDataStoreInt buffer,
                                                          int immunity)
        This constructs an array of buffered poisonable one-one integer channels.
        Parameters:
        size - defines size of the array (must be positive).
        buffer - defines size and policy (the channel will clone its own).
        immunity - the channels are immune to poison strengths up to and including this level.
        Returns:
        the channel array.
      • one2anyIntArray

        public static One2AnyChannelInt[] one2anyIntArray​(int size,
                                                          ChannelDataStoreInt buffer,
                                                          int immunity)
        This constructs an array of buffered poisonable one-any integer channels.
        Parameters:
        size - defines size of the array (must be positive).
        buffer - defines size and policy (the channel will clone its own).
        immunity - the channels are immune to poison strengths up to and including this level.
        Returns:
        the channel array.
      • any2oneIntArray

        public static Any2OneChannelInt[] any2oneIntArray​(int size,
                                                          ChannelDataStoreInt buffer,
                                                          int immunity)
        This constructs an array of buffered poisonable any-one integer channels.
        Parameters:
        size - defines size of the array (must be positive).
        buffer - defines size and policy (the channel will clone its own).
        immunity - the channels are immune to poison strengths up to and including this level.
        Returns:
        the channel array.
      • any2anyIntArray

        public static Any2AnyChannelInt[] any2anyIntArray​(int size,
                                                          ChannelDataStoreInt buffer,
                                                          int immunity)
        This constructs an array of buffered poisonable any-any integer channels.
        Parameters:
        size - defines size of the array (must be positive).
        buffer - defines size and policy (the channel will clone its own).
        immunity - the channels are immune to poison strengths up to and including this level.
        Returns:
        the channel array.
      • one2oneSymmetricInt

        public static One2OneChannelSymmetricInt one2oneSymmetricInt()
        This constructs an integer carrying channel that may only be connected to one writer and one reader process at a time. The channel is zero-buffered – the writer and reader processes must synchronise.

        The symmetry relates to the use of the channel's ends as guards in an Alternative: both ends may be so used.

        Returns:
        the channel.
      • one2oneSymmetricIntArray

        public static One2OneChannelSymmetricInt[] one2oneSymmetricIntArray​(int size)
        This constructs an array of symmetric one-one integer channels.
        Parameters:
        size - defines size of the array (must be positive).
        Returns:
        the channel array.
      • getInputArray

        public static AltingChannelInput[] getInputArray​(One2OneChannel[] c)
        This extracts the input-ends from the given channel array. Each element of the returned array is the input-end of the channel at the corresponding index in the given channel array.
        Parameters:
        c - an array of channels.
        Returns:
        the array of input-ends from the given channel array.
      • getInputArray

        public static SharedChannelInput[] getInputArray​(One2AnyChannel[] c)
        This extracts the input-ends from the given channel array. Each element of the returned array is the input-end of the channel at the corresponding index in the given channel array.
        Parameters:
        c - an array of channels.
        Returns:
        the array of input-ends from the given channel array.
      • getInputArray

        public static AltingChannelInput[] getInputArray​(Any2OneChannel[] c)
        This extracts the input-ends from the given channel array. Each element of the returned array is the input-end of the channel at the corresponding index in the given channel array.
        Parameters:
        c - an array of channels.
        Returns:
        the array of input-ends from the given channel array.
      • getInputArray

        public static SharedChannelInput[] getInputArray​(Any2AnyChannel[] c)
        This extracts the input-ends from the given channel array. Each element of the returned array is the input-end of the channel at the corresponding index in the given channel array.
        Parameters:
        c - an array of channels.
        Returns:
        the array of input-ends from the given channel array.
      • getOutputArray

        public static ChannelOutput[] getOutputArray​(One2OneChannel[] c)
        This extracts the output-ends from the given channel array. Each element of the returned array is the output-end of the channel at the corresponding index in the given channel array.
        Parameters:
        c - an array of channels.
        Returns:
        the array of output-ends from the given channel array.
      • getOutputArray

        public static ChannelOutput[] getOutputArray​(One2AnyChannel[] c)
        This extracts the output-ends from the given channel array. Each element of the returned array is the output-end of the channel at the corresponding index in the given channel array.
        Parameters:
        c - an array of channels.
        Returns:
        the array of output-ends from the given channel array.
      • getOutputArray

        public static SharedChannelOutput[] getOutputArray​(Any2OneChannel[] c)
        This extracts the output-ends from the given channel array. Each element of the returned array is the output-end of the channel at the corresponding index in the given channel array.
        Parameters:
        c - an array of channels.
        Returns:
        the array of output-ends from the given channel array.
      • getOutputArray

        public static SharedChannelOutput[] getOutputArray​(Any2AnyChannel[] c)
        This extracts the output-ends from the given channel array. Each element of the returned array is the output-end of the channel at the corresponding index in the given channel array.
        Parameters:
        c - an array of channels.
        Returns:
        the array of output-ends from the given channel array.
      • getInputArray

        public static AltingChannelInputInt[] getInputArray​(One2OneChannelInt[] c)
        This extracts the input-ends from the given channel array. Each element of the returned array is the input-end of the channel at the corresponding index in the given channel array.
        Parameters:
        c - an array of channels.
        Returns:
        the array of input-ends from the given channel array.
      • getInputArray

        public static SharedChannelInputInt[] getInputArray​(One2AnyChannelInt[] c)
        This extracts the input-ends from the given channel array. Each element of the returned array is the input-end of the channel at the corresponding index in the given channel array.
        Parameters:
        c - an array of channels.
        Returns:
        the array of input-ends from the given channel array.
      • getInputArray

        public static AltingChannelInputInt[] getInputArray​(Any2OneChannelInt[] c)
        This extracts the input-ends from the given channel array. Each element of the returned array is the input-end of the channel at the corresponding index in the given channel array.
        Parameters:
        c - an array of channels.
        Returns:
        the array of input-ends from the given channel array.
      • getInputArray

        public static SharedChannelInputInt[] getInputArray​(Any2AnyChannelInt[] c)
        This extracts the input-ends from the given channel array. Each element of the returned array is the input-end of the channel at the corresponding index in the given channel array.
        Parameters:
        c - an array of channels.
        Returns:
        the array of input-ends from the given channel array.
      • getOutputArray

        public static ChannelOutputInt[] getOutputArray​(One2OneChannelInt[] c)
        This extracts the output-ends from the given channel array. Each element of the returned array is the output-end of the channel at the corresponding index in the given channel array.
        Parameters:
        c - an array of channels.
        Returns:
        the array of output-ends from the given channel array.
      • getOutputArray

        public static ChannelOutputInt[] getOutputArray​(One2AnyChannelInt[] c)
        This extracts the output-ends from the given channel array. Each element of the returned array is the output-end of the channel at the corresponding index in the given channel array.
        Parameters:
        c - an array of channels.
        Returns:
        the array of output-ends from the given channel array.
      • getOutputArray

        public static SharedChannelOutputInt[] getOutputArray​(Any2OneChannelInt[] c)
        This extracts the output-ends from the given channel array. Each element of the returned array is the output-end of the channel at the corresponding index in the given channel array.
        Parameters:
        c - an array of channels.
        Returns:
        the array of output-ends from the given channel array.
      • getOutputArray

        public static SharedChannelOutputInt[] getOutputArray​(Any2AnyChannelInt[] c)
        This extracts the output-ends from the given channel array. Each element of the returned array is the output-end of the channel at the corresponding index in the given channel array.
        Parameters:
        c - an array of channels.
        Returns:
        the array of output-ends from the given channel array.