code: public boolean isMatching(MouseEvent event) {
          return (event != null) && !event.isConsumed()
                  && (mouseModifiers.isNone()
                  || ((event.isPrimaryButtonDown() == mouseButtons.isPrimary())
                  && (event.isMiddleButtonDown() == mouseButtons.isMiddle())
                  && (event.isSecondaryButtonDown() == mouseButtons.isSecondary())
                  && (event.isAltDown() == mouseModifiers.isAlt())
                  && (event.isShiftDown() == mouseModifiers.isShift())
                  && (event.isControlDown() == mouseModifiers.isControl())
                  && (event.isMetaDown() == mouseModifiers.isMeta())));
      }
docs: Check, whether the given MouseEvent is matching the current properties.
  
  @param event MouseEvent to test.
  @return True, if no modifiers are set, or the event matches exactly the properties.
  False, if some modifiers are set, and the event doesn't match them, or if the event is null, or already consumed.