<commit_before>package jsettlers.common.buildings;

import java.util.List;

import jsettlers.common.buildings.OccupyerPlace.ESoldierType;
import jsettlers.common.mapobject.EMapObjectType;
import jsettlers.common.mapobject.IMapObject;
import jsettlers.common.material.EPriority;
import jsettlers.common.player.IPlayerable;
import jsettlers.common.position.ILocatable;
import jsettlers.common.selectable.ISelectable;
import jsettlers.common.sound.ISoundable;

/**
 * This is a normal building.
 * <p>
 * Buildings are map objects wit type {@link EMapObjectType#BUILDING}
 * 
 * @author michael
 * @author <NAME>
 */
public interface IBuilding extends IMapObject, IPlayerable, ISelectable, ILocatable {

	/**
	 * Gets the type definition for the building.
	 * 
	 * @return The building type.
	 */
	EBuildingType getBuildingType();

	/**
	 * if the building is currently working
	 * 
	 * @return true if working is enabled (no matter if it really works)
	 */
	@Deprecated
	boolean isWorking();

	/**
	 * 
	 * @return Returns the priority of this Building in receiving materials.
	 */
	EPriority getPriority();

	/**
	 * 
	 * @return true if this building is occupied or does not need to be occupied.
	 */
	boolean isOccupied();

	/**
	 * Gets the materials this building produces or needs.
	 * <p>
	 * When a building is under construction, this is the list of materials this building needs to be build (stones an wood) and it produces.
	 * <p>
	 * When it's construction finished, it is a list of things it needs and it currently has.
	 * <p>
	 * Empty stacks are also in the list.
	 * 
	 * @return A list of materials for this building.
	 */
	List<IBuildingMaterial> getMaterials();

	/**
	 * This is a mill building. An animation is shown when {@link #isWorking()} returns true.
	 * 
	 * @author michael
	 */
	static interface IMill extends IBuilding, ISoundable {
		/**
		 * If the woking animation of the mill should be shown.
		 * 
		 * @return True if the mill is working.
		 */
		boolean isRotating();
	}

	/**
	 * This interface should be implemented by towers that can have occupying people in them.
	 * 
	 * @author michael
	 */
	static interface IOccupyed extends IBuilding {
		/**
		 * Gets a list of people occupying this building.
		 * 
		 * @return The list of people currently in the building.
		 */
		List<? extends IBuildingOccupyer> getOccupyers();

		/**
		 * Gets the number of soldiers the user has set to be requested at maximum for this building.
		 * 
		 * @param type
		 *            The type of slots.
		 * @return The number of soldiers we have at maximum.
		 */
		int getMaximumRequestedSoldiers(ESoldierType type);

		/**
		 * Sets the maximum number of requested soldiers for the given type. The number may be silently clamped by the logic depending on how much
		 * free space is available.
		 * 
		 * @param type
		 *            The building type.
		 * @param max
		 *            The maximum.
		 */
		void setMaximumRequestedSoldiers(ESoldierType type, int max);

		/**
		 * Gets the number of soldiers that are currently comming or already inside this building.
		 * 
		 * @param type
		 *            The type.
		 * @return The number of soldiers comming plus the number of soldiers already inside the building.
		 */
		int getCurrentlyCommingSoldiers(ESoldierType type);
	}

}
<commit_msg>updated IBuildings interface to be able to retrieve the buildings current priority<commit_after>package jsettlers.common.buildings;

import java.util.List;

import jsettlers.common.buildings.OccupyerPlace.ESoldierType;
import jsettlers.common.mapobject.EMapObjectType;
import jsettlers.common.mapobject.IMapObject;
import jsettlers.common.material.EPriority;
import jsettlers.common.player.IPlayerable;
import jsettlers.common.position.ILocatable;
import jsettlers.common.selectable.ISelectable;
import jsettlers.common.sound.ISoundable;

/**
 * This is a normal building.
 * <p>
 * Buildings are map objects wit type {@link EMapObjectType#BUILDING}
 * 
 * @author michael
 * @author <NAME>
 */
public interface IBuilding extends IMapObject, IPlayerable, ISelectable, ILocatable {

	/**
	 * Gets the type definition for the building.
	 * 
	 * @return The building type.
	 */
	EBuildingType getBuildingType();

	/**
	 * if the building is currently working
	 * 
	 * @return true if working is enabled (no matter if it really works)
	 */
	@Deprecated
	boolean isWorking();

	/**
	 * 
	 * @return Returns the priority of this Building in receiving materials.
	 */
	EPriority getPriority();

	/**
	 * 
	 * @return true if this building is occupied or does not need to be occupied.
	 */
	boolean isOccupied();

	/**
	 * Gets the materials this building produces or needs.
	 * <p>
	 * When a building is under construction, this is the list of materials this building needs to be build (stones an wood) and it produces.
	 * <p>
	 * When it's construction finished, it is a list of things it needs and it currently has.
	 * <p>
	 * Empty stacks are also in the list.
	 * 
	 * @return A list of materials for this building.
	 */
	List<IBuildingMaterial> getMaterials();

	/**
	 * This is a mill building. An animation is shown when {@link #isWorking()} returns true.
	 * 
	 * @author michael
	 */
	static interface IMill extends IBuilding, ISoundable {
		/**
		 * If the woking animation of the mill should be shown.
		 * 
		 * @return True if the mill is working.
		 */
		boolean isRotating();
	}

	/**
	 * This interface should be implemented by towers that can have occupying people in them.
	 * 
	 * @author michael
	 */
	static interface IOccupyed extends IBuilding {
		/**
		 * Gets a list of people occupying this building.
		 * 
		 * @return The list of people currently in the building.
		 */
		List<? extends IBuildingOccupyer> getOccupyers();

		/**
		 * Gets the number of soldiers the user has set to be requested at maximum for this building.
		 * 
		 * @param type
		 *            The type of slots.
		 * @return The number of soldiers we have at maximum.
		 */
		int getMaximumRequestedSoldiers(ESoldierType type);

		/**
		 * Sets the maximum number of requested soldiers for the given type. The number may be silently clamped by the logic depending on how much
		 * free space is available.
		 * 
		 * @param type
		 *            The building type.
		 * @param max
		 *            The maximum.
		 */
		void setMaximumRequestedSoldiers(ESoldierType type, int max);

		/**
		 * Gets the number of soldiers that are currently comming or already inside this building.
		 * 
		 * @param type
		 *            The type.
		 * @return The number of soldiers comming plus the number of soldiers already inside the building.
		 */
		int getCurrentlyCommingSoldiers(ESoldierType type);
	}
}

{'fraction_non_alphanumeric': 0.08027621924902892, 'fraction_numerical': 0.0, 'mean_word_length': 2.7416576964477932, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '2003348', 'n_tokens_mistral': 2152, 'n_tokens_neox': 1852, 'n_words': 755}