/**
  * <p>Constructs and returns an array of <code>Any2AnyChannelInt</code> objects
  * which use the specified <code>ChannelDataStoreInt</code> object as a
  * buffer.
  * </p>
  * <p>The buffer supplied to this method is cloned before it is inserted into
  * the channel. This is why an array of buffers is not required.
  * </p>
  *
  * @param	buffer	the <code>ChannelDataStoreInt</code> to use.
  * @param	n	    the size of the array of channels.
  * @return the array of buffered channels.
  *
  * @see jcsp.lang.BufferedChannelIntArrayFactory#createAny2Any(jcsp.util.ints.ChannelDataStoreInt,int)
  * @see jcsp.util.ints.ChannelDataStoreInt
  */
 public Any2AnyChannelInt[] createAny2Any(ChannelDataStoreInt buffer, int n)
 {
     Any2AnyChannelInt[] toReturn = new Any2AnyChannelInt[n];
     for (int i = 0; i < n; i++)
     {
         toReturn[i] = createAny2Any(buffer);
     }
     return(toReturn);
 }
 /**
  * <p>Constructs and returns an array of <code>One2OneChannelInt</code> objects
  * which use the specified <code>ChannelDataStoreInt</code> object as a
  * buffer.
  * </p>
  * <p>The buffer supplied to this method is cloned before it is inserted into
  * the channel. This is why an array of buffers is not required.
  * </p>
  *
  * @param	buffer	the <code>ChannelDataStoreInt</code> to use.
  * @param	n	    the size of the array of channels.
  * @return the array of buffered channels.
  *
  * @see jcsp.lang.BufferedChannelIntArrayFactory#createOne2One(jcsp.util.ints.ChannelDataStoreInt,int)
  * @see jcsp.util.ints.ChannelDataStoreInt
  */
 public One2OneChannelInt[] createOne2One(ChannelDataStoreInt buffer, int n)
 {
     One2OneChannelInt[] toReturn = new One2OneChannelInt[n];
     for (int i = 0; i < n; i++)
     {
         toReturn[i] = createOne2One(buffer);
     }
     return(toReturn);
 }
 /**
  * Creates an array of One2OneChannelInts using the specified ChannelDataStoreInt.
  *
  * @param n the number of channels to create in the array
  * @return the array of One2OneChannelIntImpl
  */
 public static One2OneChannelInt[] create(int n, ChannelDataStoreInt store)
 {
     One2OneChannelInt[] channels = new One2OneChannelIntImpl[n];
     for (int i = 0; i < n; i++)
     {
         channels[i] = new BufferedOne2OneChannelIntImpl(store);
     }
     return(channels);
 }
 /**
  * Constructs a new BufferedOne2OneChannelIntImpl with the specified ChannelDataStoreInt.
  *
  * @param data the ChannelDataStoreInt used to store the data for the channel
  */
 public BufferedOne2OneChannelIntImpl(ChannelDataStoreInt data)
 {
     if (data == null)
     {
         throw new ArgumentException
                   ("Null ChannelDataStoreInt given to channel constructor ...\n");
     }
     this.data = (ChannelDataStoreInt)data.Clone();
 }
Esempio n. 5
0
        public static Any2OneChannelInt[] any2oneIntArray(int size, ChannelDataStoreInt data)
        {
            Any2OneChannelInt[] r = new Any2OneChannelInt[size];
            for (int i = 0; i < size; i++)
            {
                r[i] = any2oneInt(data);
            }

            return(r);
        }
 /**
  * Constructs a new BufferedOne2OneChannel with the specified ChannelDataStore.
  *
  * @param data the ChannelDataStore used to store the data for the channel
  */
 public PoisonableBufferedOne2OneChannelInt(ChannelDataStoreInt data, int _immunity)
 {
     if (data == null)
     {
         throw new ArgumentException
                   ("Null ChannelDataStore given to channel constructor ...\n");
     }
     this.data = (ChannelDataStoreInt)data.Clone();
     immunity  = _immunity;
 }
Esempio n. 7
0
        public static Any2AnyChannelInt[] any2anyIntArray(int size, ChannelDataStoreInt data, int immunity)
        {
            Any2AnyChannelInt[] r = new Any2AnyChannelInt[size];
            for (int i = 0; i < size; i++)
            {
                r[i] = any2anyInt(data, immunity);
            }

            return(r);
        }
Esempio n. 8
0
        public static One2AnyChannelInt[] one2anyIntArray(int size, ChannelDataStoreInt data)
        {
            One2AnyChannelInt[] r = new One2AnyChannelInt[size];
            for (int i = 0; i < size; i++)
            {
                r[i] = one2anyInt(data);
            }

            return(r);
        }
Esempio n. 9
0
        public static One2OneChannelInt[] one2oneIntArray(int size, ChannelDataStoreInt data, int immunity)
        {
            One2OneChannelInt[] r = new One2OneChannelInt[size];
            for (int i = 0; i < size; i++)
            {
                r[i] = one2oneInt(data, immunity);
            }

            return(r);
        }
 internal PoisonableBufferedOne2AnyChannelInt(ChannelDataStoreInt _data, int _immunity) : base(new PoisonableBufferedOne2OneChannelInt(_data, _immunity))
 {
 }
 /**
  * <p>Constructs and returns a <code>Any2AnyChannelInt</code> object which
  * uses the specified <code>ChannelDataStoreInt</code> object as a buffer.
  * </p>
  * <p>The buffer supplied to this method is cloned before it is inserted into
  * the channel.
  * </p>
  *
  * @param	buffer	the <code>ChannelDataStoreInt</code> to use.
  * @return the buffered channel.
  *
  * @see jcsp.lang.BufferedChannelIntFactory#createAny2Any(jcsp.util.ints.ChannelDataStoreInt)
  * @see jcsp.util.ints.ChannelDataStoreInt
  */
 public Any2AnyChannelInt createAny2Any(ChannelDataStoreInt buffer)
 {
     return(new BufferedAny2AnyChannelIntImpl(buffer));
 }
Esempio n. 12
0
 public BufferedAny2AnyChannelIntImpl(ChannelDataStoreInt data) : base(new BufferedOne2OneChannelIntImpl(data))
 {
 }
 /**
  * Creates a One2OneChannelIntImpl using the specified ChannelDataStoreInt.
  *
  * @return the One2OneChannelIntImpl
  */
 public static One2OneChannelInt create(ChannelDataStoreInt store)
 {
     return(new BufferedOne2OneChannelIntImpl(store));
 }
Esempio n. 14
0
 /**
  * Constructs and returns an array of <code>Any2AnyChannelInt</code> objects
  * which use the specified <code>ChannelDataStoreInt</code> object as a
  * buffer.
  *
  * @param	buffer	the <code>ChannelDataStoreInt</code> to use.
  * @param	n	    the size of the array of channels.
  * @return the array of buffered channels.
  *
  * @see jcsp.lang.BufferedChannelIntArrayFactory#createAny2Any(ChannelDataStoreInt, int)
  * @see jcsp.util.ints.ChannelDataStoreInt
  */
 public static Any2AnyChannelInt[] createAny2Any(ChannelDataStoreInt buffer, int n)
 {
     return(factory.createAny2Any(buffer, n));
 }
Esempio n. 15
0
 /**
  * Constructs and returns an array of <code>One2OneChannelInt</code> objects
  * which use the specified <code>ChannelDataStoreInt</code> object as a
  * buffer.
  *
  * @param	buffer	the <code>ChannelDataStoreInt</code> to use.
  * @param	n	    the size of the array of channels.
  * @return the array of buffered channels.
  *
  * @see jcsp.lang.BufferedChannelIntArrayFactory#createOne2One(ChannelDataStoreInt, int)
  * @see jcsp.util.ints.ChannelDataStoreInt
  */
 public static One2OneChannelInt[] createOne2One(ChannelDataStoreInt buffer, int n)
 {
     return(factory.createOne2One(buffer, n));
 }
Esempio n. 16
0
 /**
  * Constructs and returns a <code>Any2AnyChannelInt</code> object which
  * uses the specified <code>ChannelDataStoreInt</code> object as a buffer.
  *
  * @param	buffer	the <code>ChannelDataStoreInt</code> to use.
  * @return the buffered channel.
  *
  * @see jcsp.lang.BufferedChannelIntFactory#createAny2Any(ChannelDataStoreInt)
  * @see jcsp.util.ints.ChannelDataStoreInt
  */
 public static Any2AnyChannelInt createAny2Any(ChannelDataStoreInt buffer)
 {
     return(factory.createAny2Any(buffer));
 }
Esempio n. 17
0
 /**
  * Constructs and returns a <code>One2OneChannelInt</code> object which
  * uses the specified <code>ChannelDataStoreInt</code> object as a buffer.
  *
  * @param	buffer	the <code>ChannelDataStoreInt</code> to use.
  * @return the buffered channel.
  *
  * @see jcsp.lang.BufferedChannelIntFactory#createOne2One(ChannelDataStoreInt)
  * @see jcsp.util.ints.ChannelDataStoreInt
  */
 public static One2OneChannelInt createOne2One(ChannelDataStoreInt buffer)
 {
     return(factory.createOne2One(buffer));
 }
 /**
  * <p>Constructs and returns a <code>One2OneChannelInt</code> object which
  * uses the specified <code>ChannelDataStoreInt</code> object as a buffer.
  * </p>
  * <p>The buffer supplied to this method is cloned before it is inserted into
  * the channel.
  * </p>
  *
  * @param	buffer	the <code>ChannelDataStoreInt</code> to use.
  * @return the buffered channel.
  *
  * @see jcsp.lang.BufferedChannelIntFactory#createOne2One(jcsp.util.ints.ChannelDataStoreInt)
  * @see jcsp.util.ints.ChannelDataStoreInt
  */
 public One2OneChannelInt createOne2One(ChannelDataStoreInt buffer)
 {
     return(new BufferedOne2OneChannelIntImpl(buffer));
 }
Esempio n. 19
0
 public static Any2AnyChannelInt any2anyInt(ChannelDataStoreInt buffer, int immunity)
 {
     return(new PoisonableBufferedAny2AnyChannelInt(buffer, immunity));
 }
Esempio n. 20
0
 public static One2OneChannelInt one2oneInt(ChannelDataStoreInt buffer, int immunity)
 {
     return(new PoisonableBufferedOne2OneChannelInt(buffer, immunity));
 }
Esempio n. 21
0
 public static Any2AnyChannelInt any2anyInt(ChannelDataStoreInt buffer)
 {
     return(new BufferedAny2AnyChannelIntImpl(buffer));
 }
Esempio n. 22
0
 public static One2AnyChannelInt one2anyInt(ChannelDataStoreInt buffer)
 {
     return(new BufferedOne2AnyChannelIntImpl(buffer));
 }