<commit_before>package org.eclipse.scanning.api;

import org.eclipse.scanning.api.points.IPosition;

/**
 * 
 * Something that can take part in a sequenced scan which can have its position set.
 * 
 * Unlike a detector, a scannable does not have a model and has attributes directly 
 * on the interface
 * 
 * @author <NAME>
 *
 */
public interface IScannable<T> extends ILevel, INameable, IConfigurable<ScannableModel> {
	
	/**
	 * Returns the current position of the Scannable. Called by ConcurentScan at the end of the point. 
	 * 
	 * @return Current position with an element for each input and extra field. null if their are no fields.
	 * @throws DeviceException
	 */
	public T getPosition() throws Exception;
	
	/**
	 * Moves to the position required, blocking until it is complete.
	 * Similar to moveTo(...) in GDA8
	 * 
	 * Same as calling setPosition(value, null);
	 * 
	 * @param position
	 * @throws Exception
	 */
	public void setPosition(T value) throws Exception;

	
	/**
	 * Moves to the position required, blocking until it is complete.
	 * Similar to moveTo(...) in GDA8
	 * 
	 * @param value that this scalar should take.
	 * @param position if within in a scan or null if not within a scan.
	 * @throws Exception
	 */
	public void setPosition(T value, IPosition position) throws Exception;

	/**
	 * The unit is the unit in which the setPosition and getPosition values are in.
	 * @return String representation of unit which setPosition and getPosition are using.
	 */
	public String getUnit();

}
<commit_msg>Made unit defaulted so that it is optional to implement getUnit().<commit_after>package org.eclipse.scanning.api;

import org.eclipse.scanning.api.points.IPosition;

/**
 * 
 * Something that can take part in a sequenced scan which can have its position set.
 * 
 * Unlike a detector, a scannable does not have a model and has attributes directly 
 * on the interface
 * 
 * @author <NAME>
 *
 */
public interface IScannable<T> extends ILevel, INameable, IConfigurable<ScannableModel> {
	
	/**
	 * Returns the current position of the Scannable. Called by ConcurentScan at the end of the point. 
	 * 
	 * @return Current position with an element for each input and extra field. null if their are no fields.
	 * @throws DeviceException
	 */
	public T getPosition() throws Exception;
	
	/**
	 * Moves to the position required, blocking until it is complete.
	 * Similar to moveTo(...) in GDA8
	 * 
	 * Same as calling setPosition(value, null);
	 * 
	 * @param position
	 * @throws Exception
	 */
	public void setPosition(T value) throws Exception;

	
	/**
	 * Moves to the position required, blocking until it is complete.
	 * Similar to moveTo(...) in GDA8
	 * 
	 * @param value that this scalar should take.
	 * @param position if within in a scan or null if not within a scan.
	 * @throws Exception
	 */
	public void setPosition(T value, IPosition position) throws Exception;

	/**
	 * The unit is the unit in which the setPosition and getPosition values are in.
	 * @return String representation of unit which setPosition and getPosition are using.
	 */
	default String getUnit() {
		return null;
	}

}

{'fraction_non_alphanumeric': 0.08133971291866028, 'fraction_numerical': 0.0012759170653907496, 'mean_word_length': 3.3983169705469845, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '4045537', 'n_tokens_mistral': 919, 'n_tokens_neox': 832, 'n_words': 392}