Good idea. Just for a teaser...
Sequence extends Function extends Relation extends Set implements
java.util.Set
Bag extends Function ...
IMO, Sun has incorrectly modelled Map (which is equivalent to Spivey's
Function) separate to a Set. However, a Function (Map) is actually a type of
Set. Sun's collections don't have a natural Relation class which is a
mapping of X to Y values, where X can be repeated if it maps to a different
Y (hence, different to Map). A Sun Map should be a type of Relation (IMO)
which I call a Function following Spivey.
I suppose there is a purist reason for using javax.z, and it should make
collections more useful and usable. One major improvement I should make is
to introduce interfaces (they are all classes at the moment). I'll do that
soon.
The ability to use domainRestriction, rangeRestriction, transitiveClosure,
inverse, relationalComposition, relationalOverride should prove interesting
and satisfying.
"Oliver Wong" <ow***@castortech.comwrote in message
news:6z5Zg.17660$P7.1375@edtnps90...
>
"Godspeed" <bl******@bigpond.net.auwrote in message
news:9l*******************@news-server.bigpond.net.au...
>>I have started writing a new collections library based on set theory as
per Spivey's Z notation.
[...]
>>
To try it out go to: http://sourceforge.net/projects/zedlib
Maybe you should put a little blurb on the homepage about why people
should prefer your library over Sun's.
- Oliver