public boolean removeStickyEvent(Object event){
synchronized (stickyEvents) {
    Class<? extends Object> eventType=event.getClass();
    Object existingEvent=stickyEvents.get(eventType);
    if (event.equals(existingEvent)) {
      stickyEvents.remove(eventType);
      return true;
    }
 else {
      return false;
    }
  }
}

public boolean removeStickyEvent ( Object event ) { synchronized ( stickyEvents ) { Class < ? extends Object > eventType = event . getClass ( ) ; Object existingEvent = stickyEvents . get ( eventType ) ; if ( event . equals ( existingEvent ) ) { stickyEvents . remove ( eventType ) ; return true ; } else { return false ; } } }
removes the sticky event if it equals to the given event .
