/** * <p>Constructs and returns an array of <code>One2AnyChannelInt</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#createOne2Any(jcsp.util.ints.ChannelDataStoreInt,int) * @see jcsp.util.ints.ChannelDataStoreInt */ public One2AnyChannelInt[] createOne2Any(ChannelDataStoreInt buffer, int n) { One2AnyChannelInt[] toReturn = new One2AnyChannelInt[n]; for (int i = 0; i < n; i++) { toReturn[i] = createOne2Any(buffer); } return(toReturn); }
/** * Constructs and returns an array of <code>One2AnyChannelInt</code> * objects. * * @param n the size of the array of channels. * @return the array of channels. * * @see jcsp.lang.ChannelIntArrayFactory#createOne2Any(int) */ public One2AnyChannelInt[] createOne2Any(int n) { One2AnyChannelInt[] toReturn = new One2AnyChannelInt[n]; for (int i = 0; i < n; i++) { toReturn[i] = createOne2Any(); } return(toReturn); }
public static One2AnyChannelInt[] one2anyIntArray(int size, ChannelDataStoreInt data, int immunity) { One2AnyChannelInt[] r = new One2AnyChannelInt[size]; for (int i = 0; i < size; i++) { r[i] = one2anyInt(data, immunity); } return(r); }
public static One2AnyChannelInt[] one2anyIntArray(int size) { One2AnyChannelInt[] r = new One2AnyChannelInt[size]; for (int i = 0; i < size; i++) { r[i] = one2anyInt(); } return(r); }