Changeset 4527


Ignore:
Timestamp:
10/24/03 18:32:39 (18 years ago)
Author:
piso
Message:

hashCode(), equals()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/Symbol.java

    r4282 r4527  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Symbol.java,v 1.88 2003-10-10 14:17:32 piso Exp $
     5 * $Id: Symbol.java,v 1.89 2003-10-24 18:32:39 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    440440    }
    441441
    442     public boolean equals(Object obj)
    443     {
    444         if (obj instanceof Symbol)
    445             return ((Symbol)obj).getName() == name;
    446         return false;
     442    public final int hashCode()
     443    {
     444        return name.hashCode();
     445    }
     446
     447    public final boolean equals(Object obj)
     448    {
     449        return this == obj;
    447450    }
    448451}
Note: See TracChangeset for help on using the changeset viewer.