<commit_before>package com.jenjinstudios.world;

import java.util.TreeMap;

/**
 * Represents a location in the world's location grid.
 *
 * @author <NAME>
 */
public class Location
{
	/** The size, int units, of each location. */
	public static final int SIZE = 10;
	/** The x coordinate of the location in it's zone's grid. */
	public final int X_COORDINATE;
	/** The z coordinate of the location in it's zone's grid. */
	public final int Z_COORDINATE;
	/** The objects residing in this location. */
	private final TreeMap<Integer, WorldObject> objects;
	/** The property of this location. */
	private Property property;

	/**
	 * Construct a new location at the given position in a zone grid.
	 *
	 * @param x The x coordinate of the zone grid.
	 * @param z The z coordinate of the zone grid.
	 */
	public Location(int x, int z)
	{
		X_COORDINATE = x;
		Z_COORDINATE = z;
		property = Property.OPEN;
		objects = new TreeMap<>();
	}

	/**
	 * Get the property of this location.
	 *
	 * @return The property of this location.
	 */
	public Property getProperty()
	{
		return property;
	}

	/**
	 * Set the property of this location.
	 *
	 * @param property The new property.
	 */
	public void setProperty(Property property)
	{
		this.property = property;
	}

	/**
	 * Get the objects residing in this location, as an array.
	 *
	 * @return An array containing all objects residing in this location.
	 */
	public WorldObject[] getObjects()
	{
		WorldObject[] r = new WorldObject[objects.size()];
		objects.values().toArray(r);
		return r;
	}

	/**
	 * Add the object to this location's object map.
	 *
	 * @param object The object to add.
	 */
	public void addObject(WorldObject object)
	{
		objects.put(object.getId(), object);
	}

	/**
	 * Remove an object from this location's object map.
	 *
	 * @param object The object to remove.
	 */
	public void removeObject(WorldObject object)
	{
		objects.remove(object.getId());
	}

	/** Specifies a property of a location. */
	public enum Property
	{
		/** Specifies that the location is open, and can be entered by objects. */
		OPEN,
		/** Specifies that the location is closed, and cannot be entered by objects. */
		CLOSED
	}
}<commit_msg>Added toString method to Location class.<commit_after>package com.jenjinstudios.world;

import java.util.TreeMap;

/**
 * Represents a location in the world's location grid.
 *
 * @author <NAME>
 */
public class Location
{
	/** The size, int units, of each location. */
	public static final int SIZE = 10;
	/** The x coordinate of the location in it's zone's grid. */
	public final int X_COORDINATE;
	/** The z coordinate of the location in it's zone's grid. */
	public final int Z_COORDINATE;
	/** The objects residing in this location. */
	private final TreeMap<Integer, WorldObject> objects;
	/** The property of this location. */
	private Property property;

	/**
	 * Construct a new location at the given position in a zone grid.
	 *
	 * @param x The x coordinate of the zone grid.
	 * @param z The z coordinate of the zone grid.
	 */
	public Location(int x, int z)
	{
		X_COORDINATE = x;
		Z_COORDINATE = z;
		property = Property.OPEN;
		objects = new TreeMap<>();
	}

	/**
	 * Get the property of this location.
	 *
	 * @return The property of this location.
	 */
	public Property getProperty()
	{
		return property;
	}

	/**
	 * Set the property of this location.
	 *
	 * @param property The new property.
	 */
	public void setProperty(Property property)
	{
		this.property = property;
	}

	/**
	 * Get the objects residing in this location, as an array.
	 *
	 * @return An array containing all objects residing in this location.
	 */
	public WorldObject[] getObjects()
	{
		WorldObject[] r = new WorldObject[objects.size()];
		objects.values().toArray(r);
		return r;
	}

	/**
	 * Add the object to this location's object map.
	 *
	 * @param object The object to add.
	 */
	public void addObject(WorldObject object)
	{
		objects.put(object.getId(), object);
	}

	/**
	 * Remove an object from this location's object map.
	 *
	 * @param object The object to remove.
	 */
	public void removeObject(WorldObject object)
	{
		objects.remove(object.getId());
	}

	@Override
	public String toString()
	{
		return "(" + X_COORDINATE + ", " + Z_COORDINATE + ")";
	}

	/** Specifies a property of a location. */
	public enum Property
	{
		/** Specifies that the location is open, and can be entered by objects. */
		OPEN,
		/** Specifies that the location is closed, and cannot be entered by objects. */
		CLOSED
	}
}
{'fraction_non_alphanumeric': 0.11101243339253997, 'fraction_numerical': 0.0008880994671403197, 'mean_word_length': 3.1368227731864096, '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': '1689522', 'n_tokens_mistral': 1465, 'n_tokens_neox': 1349, 'n_words': 532}