Checks if the target of the given event is the caption or a child of the caption.<p>

@param event the event to check

@return <code>true</code> if the target of the given event is the caption <code>false</code> otherwise
480303
private boolean isCaptionEvent(NativeEvent event) {

        EventTarget target = event.getEventTarget();
        if (com.google.gwt.dom.client.Element.is(target)) {
            return m_caption.getElement().isOrHasChild(com.google.gwt.dom.client.Element.as(target));
        }
        return false;
    }
801795
public boolean contains(Object o) {
		for (int i = 0; i < events.size(); i++) {
			try {
				if (events.get(i).equals(o)) {
					return true;
				}
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return false;
	}
849170
private boolean isIconTargetClicked() {
		String targetHtml = EventHandler.getNativeMouseTarget().getString();

		if (targetHtml.indexOf(ICON_EXTENSION) != -1) {
			return true;
		}

		return false;
	}
312249
@Override
	public boolean hasNext() {

		// iterate over input data until an element is created
		while (reader.hasNext() && nextElement == null) {

			try {
				final XMLEvent event = reader.nextEvent();

				switch (event.getEventType()) {

					case XMLEvent.START_DOCUMENT:
						startDocument();
						break;

					case XMLEvent.START_ELEMENT:
						startElement(event.asStartElement());
						break;

					case XMLEvent.END_DOCUMENT:
						endDocument();
						break;

					case XMLEvent.END_ELEMENT:
						endElement(event.asEndElement());
						break;

					case XMLEvent.CHARACTERS:
					case XMLEvent.CDATA:
						characters(event.asCharacters());
						break;

				}

			} catch (XMLStreamException strex) {
				logger.warn(strex.getMessage());
				break;
			}
		}

		// either an element has been created, or the stream is at its end
		return nextElement != null;
	}
773582
public boolean process(ContentEvent event) {
		InstanceContentEvent inEvent = (InstanceContentEvent) event; //((s4Event) event).getContentEvent();
		//InstanceEvent inEvent = (InstanceEvent) event;

		if (inEvent.getInstanceIndex() < 0) {
			// End learning
			predictionStream.put(event);
			return false;
		}


                if (inEvent.isTesting()){ 
			Instance trainInst = inEvent.getInstance();
			for (int i = 0; i < sizeEnsemble; i++) {
				Instance weightedInst = trainInst.copy();
				//weightedInst.setWeight(trainInst.weight() * k);
				InstanceContentEvent instanceContentEvent = new InstanceContentEvent(
						inEvent.getInstanceIndex(), weightedInst, false, true);
				instanceContentEvent.setClassifierIndex(i);
				instanceContentEvent.setEvaluationIndex(inEvent.getEvaluationIndex());	
				predictionStream.put(instanceContentEvent);
			}
		}
                
                		/* Estimate model parameters using the training data. */
		if (inEvent.isTraining()) {
			train(inEvent);
		} 
		return false;
	}
577790
private boolean isApplicable(QueryCacheEventData event) {
        if (!getInfo().isPublishable()) {
            return false;
        }

        final int partitionId = event.getPartitionId();

        if (isEndEvent(event)) {
            sequenceProvider.reset(partitionId);
            removeFromBrokenSequences(event);
            return false;
        }

        if (isNextEvent(event)) {
            long currentSequence = sequenceProvider.getSequence(partitionId);
            sequenceProvider.compareAndSetSequence(currentSequence, event.getSequence(), partitionId);

            removeFromBrokenSequences(event);
            return true;
        }

        handleUnexpectedEvent(event);

        return false;
    }
704987
public boolean validateEventName(String eventName) {
        boolean isValid = false;
        if ((AuditConstants.validEventNamesList).contains(eventName))
            isValid = true;
        return isValid;
    }
1220913
protected static boolean isChildOf(String parent, String child) {
      if (parent == null || child == null)
         return false;
      if (!child.startsWith((parent.endsWith(SEPARATOR) ? parent : parent + SEPARATOR)))
         return false;
      if (child.length() <= parent.length())
         return false;
      int from = parent.equals(SEPARATOR) ? parent.length() : parent.length() + 1;
      //  if(from-1 > child.length())
      // return false;
      String[] comps = Util.components(child.substring(from), SEPARATOR);
      return comps != null && comps.length <= 1;
   }
97617
@Override
    public boolean process(ContentEvent event) {

        ResultContentEvent inEvent = (ResultContentEvent) event;
        double[] prediction = inEvent.getClassVotes();
        int instanceIndex = (int) inEvent.getInstanceIndex();
        
        addStatisticsForInstanceReceived(instanceIndex, inEvent.getClassifierIndex(), prediction, 1);
        //Boosting
        addPredictions(instanceIndex, inEvent, prediction);              
               
        if (inEvent.isLastEvent() || hasAllVotesArrivedInstance(instanceIndex)) {
            DoubleVector combinedVote = this.mapVotesforInstanceReceived.get(instanceIndex);
            if (combinedVote == null){
                combinedVote = new DoubleVector();
            }
            ResultContentEvent outContentEvent = new ResultContentEvent(inEvent.getInstanceIndex(),
                    inEvent.getInstance(), inEvent.getClassId(),
                    combinedVote.getArrayCopy(), inEvent.isLastEvent());
            outContentEvent.setEvaluationIndex(inEvent.getEvaluationIndex());
            outputStream.put(outContentEvent);
            clearStatisticsInstance(instanceIndex);
            //Boosting
            computeBoosting(inEvent, instanceIndex);
            return true;
        }
        return false;

    }
1210742
boolean onKeyDown(Event event) {
    if (listener != null) {
      listener.onKeyDown(event);
      return event.flags().getPreventDefault();
    }
    return false;
  }
578899
function (event) {
                for (var i = 0; i < this.events.length; i++) {
                    if (event === this.events[i]) {
                        return true;
                    }
                }
                return false;
            }
521225
public boolean filter(Event event) {
        LOG.info("StringContentFilter called");
        
        if (wordsToFilter != null) {
            for (String filterWord : wordsToFilter) {
                if (event.getContent() != null
                        && -1 != event.getContent().indexOf(filterWord)) {
                    return true;
                }
            }
        }
        return false;
    }
685321
private boolean isImage(I_CmsDraggable draggable) {

        return (draggable instanceof CmsResultListItem)
            && CmsToolbarAllGalleriesMenu.DND_MARKER.equals(((CmsResultListItem)draggable).getData());

    }
195039
public void processEvent(EventObject event) {
    if (event instanceof RequestEvent) {
      processRequest((RequestEvent) event);
    } else if (event instanceof ResponseEvent) {
      processResponse((ResponseEvent) event);
    } else if (event instanceof TimeoutEvent) {
      processTimeout((TimeoutEvent) event);
    } else {
      LOG.error("invalid event type received: {}: {}", event.getClass().getName(), event.toString());
    }
  }
26072
public void actionPerformed(ActionEvent event) {
        String cmd = event.getActionCommand();
        if (cmd.equals(CUT)) {
            text.cut();
        } else if (cmd.equals(COPY)) {
            text.copy();
        } else if (cmd.equals(PASTE)) {
            text.paste();
        }
    }
1116366
public boolean isExpected(final HandlingEvent event) {
		if (getLegs().isEmpty()) {
			return true;
		}

		if (event.getType() == Type.RECEIVE) {
			// Check that the first leg's origin is the event's location
			final Leg leg = getLegs().get(0);
			return (leg.getFrom().equals(event.getLocation()));
		}

		if (event.getType() == Type.LOAD) {
			// Check that the there is one leg with same from location and
			// carrier movement
			for (Leg leg : getLegs()) {
				if (leg.getFrom().equals(event.getLocation())
						&& leg.getCarrierMovement().equals(
								event.getCarrierMovement()))
					return true;
			}
			return false;
		}

		if (event.getType() == Type.UNLOAD) {
			// Check that the there is one leg with same to loc and carrier
			// movement
			for (Leg leg : getLegs()) {
				if (leg.getTo().equals(event.getLocation())
						&& leg.getCarrierMovement().equals(
								event.getCarrierMovement()))
					return true;
			}
			return false;
		}

		if (event.getType() == Type.CLAIM) {
			// Check that the last leg's destination is from the event's
			// location
			final Leg leg = getLegs().get(getLegs().size() - 1);
			return (leg.getTo().equals(event.getLocation()));
		}

		// HandlingEvent.Type.CUSTOMS;
		return true;
	}
865537
@Check(CheckType.FAST)
	public void checkSuperType(SarlEvent event) {
		checkSuperTypes(
				event,
				SARL_EVENT__EXTENDS,
				Utils.singletonList(event.getExtends()),
				Event.class,
				false);
	}