Example #1
0
 /**
  * Connects the output channels for use by this receptacle. Causes no
  * events.
  *
  * @param rackChannels
  *            One channel is expected for each valid denomination.
  * @param coinReturn
  *            This is used when coins are to be returned to the user.
  * @param other
  *            This is another channel that can be used to discard coins; it
  *            can be the same as the coin return channel.
  */
 public void Connect(Dictionary <int, CoinChannel> rackChannels, CoinChannel coinReturn, CoinChannel other)
 {
     this.coinRacks.Clear();
     this.coinRacks         = rackChannels; // hmm
     this.coinReturnChannel = coinReturn;
     this.otherChannel      = other;
 }
Example #2
0
 /**
  * Connects an output channel to this coin rack. Any existing output
  * channels are disconnected. Causes no events to be announced.
  *
  * @param sink
  *            The new output device to act as output. Can be null, which
  *            leaves the channel without an output.
  */
 public void Connect(CoinChannel sink)
 {
     this.sink = sink;
 }
Example #3
0
 /**
  * Connects output channels to the coin slot. Causes no events.
  *
  * @param valid
  *            Where valid coins to be stored should be passed.
  * @param invalid
  *            Where invalid coins (or coins that exceed capacity) should be
  *            passed.
  */
 public void Connect(CoinChannel valid, CoinChannel invalid)
 {
     this.valid   = valid;
     this.invalid = invalid;
 }