Path: csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Cecil Westerhof Newsgroups: comp.lang.java.programmer Subject: Re: Working with an array of TreeSet Date: Wed, 11 May 2016 09:05:16 +0200 Organization: Decebal Computing Lines: 32 Message-ID: <8760uljcr7.fsf@Equus.decebal.nl> References: <87lh3ijg9u.fsf@Equus.decebal.nl> <87a8jxk3r2.fsf@Equus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="12baf5125b19322b899c79c2e3878015"; logging-data="23938"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+XtOuo3wt8L9QUWGuJfbD0fyqGCMDcnOo=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Homepage: http://www.decebal.nl/ Cancel-Lock: sha1:dqOnfe4YgnBs9wy1eWADZmXUDTU= sha1:uL3JhpqsWAUVMR/8/TqxVtMVgYA= Xref: csiph.com comp.lang.java.programmer:34282 On Wednesday 11 May 2016 02:14 CEST, Eric Sosman wrote: > On 5/10/2016 5:22 PM, Cecil Westerhof wrote: >> On Tuesday 10 May 2016 18:19 CEST, Marcel Mueller wrote: >> [...] >>> The more interesting question is why you need an array of TreeSet. >>> What is the semantic meaning of from? And what is the meaning of >>> to? >> >> I am mapping the connections of paths between nodes in a graph. >> From a node to a node. > > Perhaps a > > Map> All values from 1 to maxNode are there, but with Map I do not need a dummy with a null. So this is better I think, yes. Also when I get a situation where not every node number exists, this is certainly better. Thanks. > or (if there can be more than one Edge from Node X to Node Y) > > Map> There is only one. That is why I used TreeSet. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof