src/main/java/me/paulbares/subscription/ApproverWorkflowRegistrar.java
void removeSubscriber(String userId, Subscriber<Notification> subscriber) {
      Set<Subscriber<Notification>> subscribers = this.subscriberByUserId.get(userId);
      if (subscribers != null) {
        Iterator<Subscriber<Notification>> iterator = subscribers.iterator();
        while (iterator.hasNext()) {
          if (iterator.next().equals(subscriber)) {
            iterator.remove();
            if (subscribers.isEmpty()) {
              this.subscriberByUserId.remove(userId);
            }
            break; // stop here
          }
        }
      }
    }
/**
     * Removes the {@link Subscriber} to the set of subscriber associated to the given user.
     *
     * @param userId the id of the user
     * @param subscriber the {@link Subscriber} to remove
     */
Removes the  Subscriber to the set of subscriber associated to the given user.
@param userId the id of the user
@param subscriber the  Subscriber to remove
Removes the Subscriber to the set of subscriber associated to the given user . @param userId the id of the user @param subscriber the Subscriber to remove
void removeSubscriber(String userId, Subscriber<Notification> subscriber) {
      Set<Subscriber<Notification>> subscribers = this.subscriberByUserId.get(userId);
      if (subscribers != null) {
        Iterator<Subscriber<Notification>> iterator = subscribers.iterator();
        while (iterator.hasNext()) {
          if (iterator.next().equals(subscriber)) {
            iterator.remove();
            if (subscribers.isEmpty()) {
              this.subscriberByUserId.remove(userId);
            }
            break; 
          }
        }
      }
    }
void removeSubscriber ( String userId , Subscriber < Notification > subscriber ) { Set < Subscriber < Notification > > subscribers = this . subscriberByUserId . get ( userId ) ; if ( subscribers != null ) { Iterator < Subscriber < Notification > > iterator = subscribers . iterator ( ) ; while ( iterator . hasNext ( ) ) { if ( iterator . next ( ) . equals ( subscriber ) ) { iterator . remove ( ) ; if ( subscribers . isEmpty ( ) ) { this . subscriberByUserId . remove ( userId ) ; } break ; } } } }
Removes the {@link Subscriber} to the set of subscriber associated to the given user.
Removes the { @link Subscriber } to the set of subscriber associated to the given user .
// stop here