Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: iteration blues Date: Sat, 5 Nov 2011 13:41:19 -0700 (PDT) Organization: http://groups.google.com Lines: 15 Message-ID: <7694874.405.1320525679938.JavaMail.geo-discussion-forums@prgt40> References: <9hhpttFi6sU1@mid.individual.net> <9866683.514.1320428761383.JavaMail.geo-discussion-forums@yqmj32> <9hj8t5FoulU1@mid.individual.net> Reply-To: comp.lang.java.programmer@googlegroups.com NNTP-Posting-Host: 173.164.137.213 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1320526042 11177 127.0.0.1 (5 Nov 2011 20:47:22 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 5 Nov 2011 20:47:22 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=173.164.137.213; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9609 Eric Sosman wrote: > bob wrote: >> >> Iterator.remove() is probably not well-known because it's an optional >> operation. Also, I see no easy way to tell if a given container type >> supports it other than to try it. > > The same could be said for List.add(). Indeed, and for both cases there is a ridiculously easy way to tell if a given container type supports the operation: read the friggin' Javadocs! If the container doesn't support the operation you need, don't use it. -- Lew