<commit_before>//
// $Id: Location.java,v 1.4 2001/12/05 09:06:30 mdb Exp $

package com.threerings.whirled.spot.data;

import java.awt.Point;

/**
 * A location represents a place to stand in a scene. More specifically,
 * it is a geometric location in a scene with an orientation that would be
 * assumed by any body sprite standing in that location. Locations may
 * optionally belong to a cluster, which associates them with a group of
 * locations for speaking purposes (bodies in the same cluster can "hear"
 * one another speak).
 */
public class Location
{
    /** This location's unique identifier. */
    public int locationId;

    /** This location's x coordinate (interpreted by the display system). */
    public int x;

    /** This location's y coordinate (interpreted by the display system). */
    public int y;

    /** This location's y orientation (interpreted by the display system). */
    public int orientation;

    /** The cluster to which this location belongs or -1 if it belongs to
     * no cluster. */
    public int clusterIndex;

    /**
     * Location equality is determined by location id. Locations will
     * claim to be equal to an <code>Integer</code> object with a value
     * equal to the location id and will claim to be equal to a
     * <code>Point</code> object with x and y coordinates equal to the x
     * and y coordinates of the location.
     */
    public boolean equals (Object other)
    {
        if (other instanceof Location) {
            Location oloc = (Location)other;
            return locationId == oloc.locationId;

        } else if (other instanceof Integer) {
            return locationId == ((Integer)other).intValue();

        } else if (other instanceof Point) {
            Point p = (Point)other;
            return (x == p.x && y == p.y);

        } else {
            return false;
        }<commit_msg>The fancy equals() turned out not to be useful based on the semantics of List.indexOf(), etc.<commit_after>//
// $Id: Location.java,v 1.5 2001/12/05 09:14:29 mdb Exp $

package com.threerings.whirled.spot.data;

/**
 * A location represents a place to stand in a scene. More specifically,
 * it is a geometric location in a scene with an orientation that would be
 * assumed by any body sprite standing in that location. Locations may
 * optionally belong to a cluster, which associates them with a group of
 * locations for speaking purposes (bodies in the same cluster can "hear"
 * one another speak).
 */
public class Location
{
    /** This location's unique identifier. */
    public int locationId;

    /** This location's x coordinate (interpreted by the display system). */
    public int x;

    /** This location's y coordinate (interpreted by the display system). */
    public int y;

    /** This location's y orientation (interpreted by the display system). */
    public int orientation;

    /** The cluster to which this location belongs or -1 if it belongs to
     * no cluster. */
    public int clusterIndex;

    /**
     * Location equality is determined by location id.
     */
    public boolean equals (Object other)
    {
        if (other instanceof Location) {
            Location oloc = (Location)other;
            return locationId == oloc.locationId;

        } else {
            return false;
        }
{'fraction_non_alphanumeric': 0.08666867288594643, 'fraction_numerical': 0.01023171832681312, 'mean_word_length': 2.5974025974025974, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4936227', 'n_tokens_mistral': 898, 'n_tokens_neox': 840, 'n_words': 405}