Changeset 12970


Ignore:
Timestamp:
10/10/10 09:15:49 (11 years ago)
Author:
ehuelsmann
Message:

Remove Remove now obsolete hash table specializations;
in order to be able to instantiate HashTable? directly
remove the 'abstract' modifier from the class; there are no
abstract methods anymore.

Location:
trunk/abcl/src/org/armedbear/lisp
Files:
4 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/HashTable.java

    r12969 r12970  
    3737import static org.armedbear.lisp.Lisp.*;
    3838
    39 public abstract class HashTable extends LispObject {
     39public class HashTable extends LispObject {
    4040
    4141    protected static final float loadFactor = 0.75f;
     
    6868        }
    6969        return capacity;
     70    }
     71
     72    public static HashTable newEqHashTable(int size, LispObject rehashSize,
     73            LispObject rehashThreshold) {
     74        return new HashTable(new Comparator(), size, rehashSize, rehashThreshold);
     75    }
     76
     77    public static HashTable newEqlHashTable(int size, LispObject rehashSize,
     78            LispObject rehashThreshold) {
     79        return new HashTable(new EqlComparator(), size, rehashSize, rehashThreshold);
     80    }
     81
     82    public static HashTable newEqualHashTable(int size, LispObject rehashSize,
     83            LispObject rehashThreshold) {
     84        return new HashTable(new EqualComparator(), size, rehashSize, rehashThreshold);
     85    }
     86
     87    public static LispObject newEqualpHashTable(int size, LispObject rehashSize,
     88            LispObject rehashThreshold) {
     89        return new HashTable(new EqualpComparator(), size, rehashSize, rehashThreshold);
    7090    }
    7191
  • trunk/abcl/src/org/armedbear/lisp/HashTableFunctions.java

    r12513 r12970  
    5858        final int n = Fixnum.getValue(size);
    5959        if (test == FUNCTION_EQL || test == NIL)
    60           return new EqlHashTable(n, rehashSize, rehashThreshold);
     60          return HashTable.newEqlHashTable(n, rehashSize, rehashThreshold);
    6161        if (test == FUNCTION_EQ)
    62           return new EqHashTable(n, rehashSize, rehashThreshold);
     62          return HashTable.newEqHashTable(n, rehashSize, rehashThreshold);
    6363        if (test == FUNCTION_EQUAL)
    64           return new EqualHashTable(n, rehashSize, rehashThreshold);
     64          return HashTable.newEqualHashTable(n, rehashSize, rehashThreshold);
    6565        if (test == FUNCTION_EQUALP)
    66           return new EqualpHashTable(n, rehashSize, rehashThreshold);
     66          return HashTable.newEqualpHashTable(n, rehashSize, rehashThreshold);
    6767        return error(new LispError("Unsupported test for MAKE-HASH-TABLE: " +
    6868                                    test.writeToString()));
  • trunk/abcl/src/org/armedbear/lisp/Pathname.java

    r12947 r12970  
    926926    // A logical host is represented as the string that names it.
    927927    // (defvar *logical-pathname-translations* (make-hash-table :test 'equal))
    928     public static EqualHashTable LOGICAL_PATHNAME_TRANSLATIONS =
    929       new EqualHashTable(64, NIL, NIL);
     928    public static HashTable LOGICAL_PATHNAME_TRANSLATIONS =
     929      HashTable.newEqualHashTable(64, NIL, NIL);
    930930    private static final Symbol _LOGICAL_PATHNAME_TRANSLATIONS_ =
    931931      exportSpecial("*LOGICAL-PATHNAME-TRANSLATIONS*", PACKAGE_SYS,
Note: See TracChangeset for help on using the changeset viewer.