Commit Graph

25 Commits

Author SHA1 Message Date
Joel Dice
cbde34620c update copyright years 2015-03-13 12:52:59 -06:00
Joel Dice
9b7d0d1624 update copyright years 2014-04-23 15:33:41 -06:00
Joel Dice
c0d178d5f1 implement ConcurrentHashMap and AtomicReferenceArray
This is the simplest possible ConcurrentHashMap I could come up with
that works and is actually concurrent in the way one would expect.
It's pretty unconventional, being based on a persistent red-black
tree, and not particularly memory-efficient or cache-friendly.  I
think this is a good place to start, though, and it should perform
reasonably well for most workloads.  Patches for a more efficient
implementation are welcome!

I also implemented AtomicReferenceArray, since I was using it in my
first, naive attempt to implement ConcurrentHashMap.

I had to do a bit of refactoring, including moving some non-standard
stuff from java.util.Collections to avian.Data so I could make it
available to code outside the java.util package, which is why I had to
modify several unrelated files.
2014-03-12 10:44:24 -06:00
Joel Dice
2000c139ea modify TreeSet.MyIterator to support both ascending and descending iteration
This also fixes a bug such that the remove() method left the iterator
in an inconsistent state.
2013-12-04 17:52:27 -07:00
Johannes Schindelin
c023bd8654 Implement TreeSet#descendingIterator
If need be, this functionality can be sped up by implementing a
descending iterator on the tree without copying it into an ArrayList.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-11-04 15:11:19 -06:00
Joel Dice
87b02eb949 update copyright years
Previously, I used a shell script to extract modification date ranges
from the Git history, but that was complicated and unreliable, so now
every file just gets the same year range in its copyright header.  If
someone needs to know when a specific file was modified and by whom,
they can look at the Git history themselves; no need to include it
redundantly in the header.
2013-07-02 20:52:38 -06:00
Mike Keesey
59280c5780 Fixed isEmpty() on TreeSet, which actually returned !isEmpty(). 2012-07-13 15:46:01 -06:00
Mike Keesey
527526c5ea Defer to underlying PersistentSet for size. 2012-06-13 08:41:15 -06:00
Joel Dice
0addd8c814 update copyright years 2012-05-11 17:43:27 -06:00
Joel Dice
a8bb0d074b implement first() and last() in TreeSet 2011-09-29 18:25:41 -06:00
Joel Dice
3aff7dc861 add TreeSet(Collection) constructor 2011-01-20 09:39:16 -07:00
Joel Dice
f869e5be21 Merge branch 'master' into gnu
Conflicts:

	classpath/java/util/TreeSet.java
2009-07-25 18:38:57 -06:00
Joel Dice
d327f6ba5a implement java.util.TreeMap 2009-07-25 15:41:43 -06:00
Joel Dice
d0f11cd2e5 move non-standard classes to avian package 2009-06-04 17:59:34 -06:00
mweaver
6b89ecd0ee Like a noob, I missed some things... broke the compilation. 2009-04-22 15:24:26 -06:00
Joel Dice
a677a2da17 fix class cast exception in TreeSet ctor 2008-07-17 15:46:54 -06:00
Matt Weaver
2d1ec11edc Added no arg constructor to support Comparable types. 2008-07-14 08:45:51 -06:00
Zsombor
e3fd0d9c7d add a few classes and methods to the classpath
Add java.lang.CharSequence, java.util.AbstractSet,
java.util.AbstractCollection, Collections.unmodifiableSet,
 System.getProperty(String,String), etc.
2008-07-03 09:16:32 -06:00
Joel Dice
9d76d6a04e implement a few more classpath methods, including Collection.addAll and Collection.toArray 2008-02-28 11:37:10 -07:00
Joel Dice
2edaa82801 prepend copyright notice and license to all source files; add license.txt and readme.txt 2008-02-19 11:06:52 -07:00
Joel Dice
fef3cddb9e fix build breakage due to missing isEmpty() methods 2007-11-07 09:48:09 -07:00
Joel Dice
f84b865f03 implement TreeSet.toString() 2007-10-16 19:17:37 -06:00
Eric Scharff
6be84b4653 Adds some missing methods to TreeSet, which really ought to be an instance of Collection 2007-10-16 12:14:03 -06:00
Eric Scharff
5691ec87f0 Added a proper implementation of TreeSet, based on a Persistent set implementation. 2007-09-28 11:01:57 -06:00
Eric Scharff
3fb90d4c3a Added minimalist TreeSet implementation, as well as Test classes for trees
and lists.
2007-09-27 16:23:05 -06:00