Thread overview
Collections
Mar 12, 2013
ZILtoid1991
Mar 12, 2013
Zhenya
Mar 12, 2013
Zhenya
Apr 06, 2013
Stewart Gordon
March 12, 2013
Is there any equaliaments of java collections in D?
March 12, 2013
On Tuesday, 12 March 2013 at 11:57:29 UTC, ZILtoid1991 wrote:
> Is there any equaliaments of java collections in D?

https://github.com/Domain/java/tree/master/java
March 12, 2013
On Tuesday, 12 March 2013 at 12:02:03 UTC, Zhenya wrote:
> On Tuesday, 12 March 2013 at 11:57:29 UTC, ZILtoid1991 wrote:
>> Is there any equaliaments of java collections in D?
>
> https://github.com/Domain/java/tree/master/java

Oh sorry,it seems to be unfinished.
March 12, 2013
On Tue, 12 Mar 2013 07:57:24 -0400, ZILtoid1991 <ziltoidtheomnicent@gmail.com> wrote:

> Is there any equaliaments of java collections in D?

http://www.dsource.org/projects/dcollections

I also have created a github project for it, but all I did was import, I haven't done any work besides that, or add a wiki like the dsource project page.  It will be the only developed code going forward, the dsource project will eventually say "moved to github"

http://www.github.com/schveiguy/dcollections

-Steve
April 06, 2013
On 12/03/2013 11:57, ZILtoid1991 wrote:
> Is there any equaliaments of java collections in D?

Different collections that are part of the Java API have different D equivalents.

For lists, vectors and stacks, arrays (with their increased power over C, Java, etc. arrays) are more or less the D equivalent.  Can also be to some extent to implement a queue or deque.

For maps, associative arrays are the D equivalent.

Other kinds of collection (e.g. set, bag, priority queue, tree, heap) don't seem to have official D equivalents, though there are libraries that provide functionality along these lines.  For example, I wrote a set template some time ago:
http://pr.stewartsplace.org.uk/d/sutil/

Stewart.

-- 
My email address is valid but not my primary mailbox and not checked regularly.  Please keep replies on the 'group where everybody may benefit.