/[classpath]/classpath/java/util/Hashtable.java
ViewVC logotype

Diff of /classpath/java/util/Hashtable.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.23 by ericb, Mon Mar 25 07:54:38 2002 UTC revision 1.24 by ericb, Tue Mar 26 06:19:38 2002 UTC
# Line 821  public class Hashtable extends Dictionar Line 821  public class Hashtable extends Dictionar
821     */     */
822    private int hash(Object key)    private int hash(Object key)
823    {    {
824      return Math.abs(key.hashCode() % buckets.length);      // Note: Inline Math.abs here, for less method overhead, and to avoid
825        // a bootstrap dependency, since Math relies on native methods.
826        int hash = key.hashCode() % buckets.length;
827        return hash < 0 ? -hash : hash;
828    }    }
829    
830    /**    /**

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26