aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/util/HashMap.java
AgeCommit message (Collapse)AuthorFilesLines
2001-03-24HashMap.java (HashMap): If 0 is given for initialCapacity paramater, bump it ↵Bryce McKinlay1-2/+4
to 1. 2001-03-24 Bryce McKinlay <bryce@albatross.co.nz> * java/util/HashMap.java (HashMap): If 0 is given for initialCapacity paramater, bump it to 1. * java/util/Hashtable.java (Hashtable): Likewise. From-SVN: r40812
2001-02-22re PR java/2040 (java.util.Hashtable(int,float) is stricter than sun's version)Bryce McKinlay1-8/+6
Fix for PR java/2040: * java/util/HashMap.java (HashMap): Don't throw exception for loadFactor > 1. Add exception messages. * java/util/Hashtable.java (Hashtable): Likewise. From-SVN: r39969
2001-02-14re PR libgcj/1758 (java.util package lacks TreeMap)Bryce McKinlay1-10/+11
* java/util/TreeMap.java: New file. * java/util/TreeSet.java: New file. * Makefile.am: Add TreeMap and TreeSet. Enable WeakHashMap. * Makefile.in: Rebuilt. * java/util/HashSet.java (clone): Use constructor instead of calling clone on itself. * java/util/SortedSet.java: Sync with classpath. * java/util/HashMap.java (hash): Use if statement instead of ternary, for clarity. Resolves PR libgcj/1758. Resolves PR java/1684. From-SVN: r39657
2000-12-21BasicMapEntry.java: Re-added.Bryce McKinlay1-51/+9
* java/util/BasicMapEntry.java: Re-added. * java/util/HashMap.java (Entry): Extend BasicMapEntry. (putAll): Test for BasicMapEntry. * java/util/Hashtable.java (Entry): Extend BasicMapEntry. (putAll): Test for BasicMapEntry. Change references from `HashMap.Entry' to `Entry' in various places. * Makefile.am: Add BasicMapEntry.java. * Makefile.in: Rebuilt. From-SVN: r38410
2000-12-17Hashtable.java (put): Remove `last' variable.Jeff Sturm1-10/+6
2000-12-17 Jeff Sturm <jeff.sturm@commerceone.com> * java/util/Hashtable.java (put): Remove `last' variable. Link new entry to head of list. * java/util/HashMap.java (put): Ditto. From-SVN: r38325
2000-12-11Makefile.am: Add HashSet.java and java/lang/ref classes.Bryce McKinlay1-756/+655
* Makefile.am: Add HashSet.java and java/lang/ref classes. Remove BasicMapEntry.java and Bucket.java. * Makefile.in: Rebuilt. * java/util/HashMap.java: Rewritten. * java/util/HashSet.java: Imported from classpath. * java/util/WeakHashMap.java: Imported from classpath. * java/util/Hashtable.java: Rewritten based on new HashMap code. * java/util/Bucket.java: Deleted. * java/util/BasicMapEntry.java: Deleted. * java/util/Collections.java (search): Use a for-loop, not iterator hasNext(). (copy): Use a for-loop. Throw an IndexOutOfBoundsException if run out of elements in source. (max): Use a for-loop. (min): Ditto. (reverse): Keep track of positions instead of using Iterator's nextIndex() and previousIndex(). (shuffle(List)): Initialize defaultRandom if required using double-check thread safety idiom. Call two-argument shuffle method using defaultRandom. (defaultRandom): New field. (shuffle(List, Random)): Use a for-loop. Keep track of pos instead of using previousIndex() and nextIndex(). (singletonMap(iterator)): Use a HashMap.Entry, not BasicMapEntry. * java/util/AbstractCollection.java (toString): Use a StringBuffer. * java/util/AbstractMap.java (toString): Use StringBuffer. * java/lang/ref/PhantomReference.java: Imported from classpath. * java/lang/ref/SoftReference.java: Ditto. * java/lang/ref/Reference.java: Ditto. * java/lang/ref/WeakReference.java: Ditto. * java/lang/ref/ReferenceQueue.java: Ditto. From-SVN: r38183
2000-08-27ArrayList.java, [...]: Imported from GNU Classpath.Anthony Green1-0/+858
2000-08-27 Anthony Green <green@redhat.com> * java/util/ArrayList.java, java/util/Timer.java, java/util/LinkedList.java, java/util/TimerTask.java, java/util/HashMap.java, java/util/AbstractMap.java, java/util/SortedMap.java, java/util/AbstractSequentialList.java, java/util/SortedSet.java: Imported from GNU Classpath. * Makefile.in: Rebuilt. * Makefile.am: Added new files. From-SVN: r36006