@Override public synchronized void addTrigger(GpioTrigger trigger, GpioPinInput... pin) { if (pin == null || pin.length == 0) { throw new IllegalArgumentException("Missing pin argument."); } for (GpioPinInput p : pin) { // ensure the requested pin has been provisioned if (!pins.contains(p)) { throw new GpioPinNotProvisionedException(p.getPin()); } p.addTrigger(trigger); } }