Collections
Stewart Gordon
smjg_1998 at yahoo.com
Sat Apr 6 09:05:44 PDT 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.
More information about the Digitalmars-d
mailing list