<commit_before>package de.ptb.epics.eve.data.measuringstation.filter;

import de.ptb.epics.eve.data.scandescription.updatenotification.ModelUpdateEvent;

/**
 * @author mmichals
 *
 */
public class ExcludeDevicesOfScanModuleFilterManualUpdate extends
		ExcludeDevicesOfScanModuleFilter {

	/* indicates whether the filter should update itself, if it is triggered */
	private boolean update;
	
	/**
	 * 
	 * @param excludeAxes
	 * @param excludeChannels
	 * @param excludePrescans
	 * @param excludePostscans
	 * @param excludePositionsings
	 */
	public ExcludeDevicesOfScanModuleFilterManualUpdate(boolean excludeAxes,
			boolean excludeChannels, boolean excludePrescans,
			boolean excludePostscans, boolean excludePositionsings) {
		super(excludeAxes, excludeChannels, excludePrescans, excludePostscans,
				excludePositionsings);
		update = false;
	}

	/**
	 * 
	 */
	@Override
	public void updateEvent(ModelUpdateEvent modelUpdateEvent) {
		if(update) {
			super.updateEvent(modelUpdateEvent);
		}
	}
	
	/**
	 * 
	 */
	public void update() {
		super.updateEvent(null);
	}
}<commit_msg>documentation for the newly created filter (performance issue)<commit_after>package de.ptb.epics.eve.data.measuringstation.filter;

import de.ptb.epics.eve.data.scandescription.updatenotification.ModelUpdateEvent;

/**
 * <code>ExcludeDevicesOfScanModuleFilterManualUpdate</code> is a modified 
 * version of 
 * {@link de.ptb.epics.eve.data.measuringstation.filter.ExcludeDevicesOfScanModuleFilter}.
 * It differs in the way it updates itself (when receiving update events). The 
 * Update mechanism is suspended by default and can be activated (and 
 * deactivated) via {@link #setUpdate(boolean)}. * 
 * 
 * @author <NAME>
 * @since 0.4.2
 */
public class ExcludeDevicesOfScanModuleFilterManualUpdate extends
		ExcludeDevicesOfScanModuleFilter {

	/* indicates whether the filter should update itself, if it is triggered */
	private boolean update;
	
	/**
	 * Constructor.
	 * 
	 * @param excludeAxes
	 * @param excludeChannels
	 * @param excludePrescans
	 * @param excludePostscans
	 * @param excludePositionsings
	 */
	public ExcludeDevicesOfScanModuleFilterManualUpdate(boolean excludeAxes,
			boolean excludeChannels, boolean excludePrescans,
			boolean excludePostscans, boolean excludePositionsings) {
		super(excludeAxes, excludeChannels, excludePrescans, excludePostscans,
				excludePositionsings);
		update = false;
	}

	/**
	 * {@inheritDoc}
	 * <br>
	 * Only has the described effect if {@link #setUpdate(boolean)} is called 
	 * with <code>true</code> as argument.
	 */
	@Override
	public void updateEvent(ModelUpdateEvent modelUpdateEvent) {
		if(update) {
			super.updateEvent(modelUpdateEvent);
		}
	}
	
	/**
	 * Forces the filter to update itself.
	 */
	public void update() {
		super.updateEvent(null);
	}
	
	/**
	 * Sets whether the filter should update itself when an update event is 
	 * received.
	 * 
	 * @param update <code>true</code> if the filter should update itself when 
	 * 		an update event is received, <code>false</code> otherwise
	 */
	public void setUpdate(boolean update) {
		this.update = update;
	}
}
{'fraction_non_alphanumeric': 0.09453848610667519, 'fraction_numerical': 0.0009581603321622484, 'mean_word_length': 4.418685121107266, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5568593', 'n_tokens_mistral': 1025, 'n_tokens_neox': 906, 'n_words': 232}