This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 88606 - Add NbCollections.iterable(Iterator|Enumeration)
Summary: Add NbCollections.iterable(Iterator|Enumeration)
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: apireviews
Depends on:
Reported: 2006-11-03 13:55 UTC by Jesse Glick
Modified: 2008-12-22 20:09 UTC (History)
0 users

See Also:
Exception Reporter:

Proposed patch (5.92 KB, patch)
2006-11-03 13:57 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2006-11-03 13:55:26 UTC
Since the JDK 5 enhanced for loop does not support a raw Iterator (or
Enumeration), it is often convenient to have a wrapper which lets them be used
in such loops. Very simple.
Comment 1 Jesse Glick 2006-11-03 13:57:03 UTC
Created attachment 35767 [details]
Proposed patch
Comment 2 Jesse Glick 2006-11-03 13:57:49 UTC
Please review.
Comment 3 Jesse Glick 2006-11-10 14:59:51 UTC
Planning for Monday. No comments?
Comment 4 Jaroslav Tulach 2006-11-10 15:16:40 UTC
My obvious comment is to put one of those methods into Enumerations class, but 
I am sure it is going to be rejected...

Comment 5 Jesse Glick 2006-11-10 15:29:12 UTC
iterable(Enumeration) could go into Enumerations. On the other hand, this would
separate it from iterable(Iterator) which it is clearly related to. Same
tradeoff as for checkedEnumerationByFilter in the past - while it deals with
Enumeration's, it's a direct analogue of non-Enumeration methods which are in
NbCollections. I think it's slightly more natural to put it into NbCollections,
but thanks for reminding me: I can put a @see into Enumerations as before, in
case people go looking there first.
Comment 6 Jesse Glick 2006-11-13 20:12:34 UTC
1.38 ant/nbproject/project.xml
1.31 ant/src-bridge/org/apache/tools/ant/module/bridge/impl/
1.37 core/startup/src/org/netbeans/core/startup/
1.11 openide/fs/nbproject/project.xml
1.10 openide/fs/src/org/openide/filesystems/
1.20 openide/util/apichanges.xml
1.23 openide/util/nbproject/
1.7  openide/util/src/org/openide/util/
1.21 openide/util/src/org/openide/util/
1.5  openide/util/src/org/openide/util/
1.4  openide/util/test/unit/src/org/openide/util/