コード例 #1
0
 /**
  * Two eventIn's are equal if they point to the same actual node and field
  *
  * @param other The object to compare against
  */
 public boolean equals(Object other) {
   if (other == null) return false;
   else if (other instanceof EventWrapper) {
     EventWrapper otherWrapper = (EventWrapper) other;
     return (otherWrapper.getFieldID() == fieldID && otherWrapper.getType() == getType());
   } else return super.equals(other);
 }
コード例 #2
0
 /**
  * This is an optimization - check the basic stuff to see if we have a match before actually
  * trying to do the projection
  */
 public boolean isMatch(EventWrapper eventWrapper) {
   if (eventWrapper.getMessageType() != mMessageType) {
     return false;
   }
   if (eventWrapper instanceof EventWrapper.MPEventWrapper) {
     if (matchAppEvent((EventWrapper.MPEventWrapper) eventWrapper)) {
       return true;
     }
   } else {
     CommerceEvent commerceEvent =
         matchCommerceEvent((EventWrapper.CommerceEventWrapper) eventWrapper);
     if (commerceEvent != null) {
       ((EventWrapper.CommerceEventWrapper) eventWrapper).setEvent(commerceEvent);
       return true;
     }
   }
   return false;
 }