<commit_before>/**
 * 
 */
package com.tilioteo.hypothesis.core;

import java.io.Serializable;

import com.tilioteo.hypothesis.event.FinishSlideEvent;
import com.tilioteo.hypothesis.event.FinishSlideEvent.Direction;
import com.tilioteo.hypothesis.event.ProcessEventBus;
import com.tilioteo.hypothesis.interfaces.SlideFascia;

/**
 * @author kamil
 *
 */
@SuppressWarnings("serial")
public class SlideNavigator implements Serializable {
	
	private SlideFascia slideFascia;
	
	public SlideNavigator(SlideFascia slideFascia) {
		this.slideFascia = slideFascia;
	}
	
	public void next() {
		if (slideFascia.hasValidFields()) {
			ProcessEventBus.get(slideFascia.getUI()).post(new FinishSlideEvent(Direction.NEXT));
		}
	}
	
	public void prior() {
		ProcessEventBus.get(slideFascia.getUI()).post(new FinishSlideEvent(Direction.PRIOR));
	}
	
	public void postMessage(Object object) {<commit_msg>added method to finish slide without validation<commit_after>/**
 * 
 */
package com.tilioteo.hypothesis.core;

import java.io.Serializable;

import com.tilioteo.hypothesis.event.FinishSlideEvent;
import com.tilioteo.hypothesis.event.FinishSlideEvent.Direction;
import com.tilioteo.hypothesis.event.ProcessEventBus;
import com.tilioteo.hypothesis.interfaces.SlideFascia;

/**
 * @author kamil
 *
 */
@SuppressWarnings("serial")
public class SlideNavigator implements Serializable {
	
	private SlideFascia slideFascia;
	
	public SlideNavigator(SlideFascia slideFascia) {
		this.slideFascia = slideFascia;
	}
	
	public void next() {
		next(true);
	}
	
	public void next(boolean validate) {
		if (!validate || slideFascia.hasValidFields()) {
			ProcessEventBus.get(slideFascia.getUI()).post(new FinishSlideEvent(Direction.NEXT));
		}
	}
	
	public void prior() {
		ProcessEventBus.get(slideFascia.getUI()).post(new FinishSlideEvent(Direction.PRIOR));
	}
	
	public void postMessage(Object object) {
{'fraction_non_alphanumeric': 0.11477151965993623, 'fraction_numerical': 0.0, 'mean_word_length': 5.448630136986301, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4895468', 'n_tokens_mistral': 697, 'n_tokens_neox': 649, 'n_words': 102}