Re: [jgrapht-users] Bug in removeAllEdges?
Brought to you by:
barak_naveh,
perfecthash
From: Trevor H. <tr...@vo...> - 2006-11-29 22:35:36
|
On Nov 26, 2006, at 6:47 AM, John V. Sichi wrote: > This one is easy to fix; we can just apply > Collections.unmodifiableSet to the computed Set returned from > edgesOf. Then you'll get the UnsupportedOperationException in all > cases (at the price of one extra object allocation, and possible > breakage for existing apps). Thanks; consistency is important. > (although you should be using ArrayList instead of Vector). Good point; I've changed it in my code. > If you want, log an enhancement request for convenience methods to > be added to the Graphs utility class (removeEdgesOf, > removeOutgoingEdgesOf, and removeIncomingEdgesOf). If you were > searching for them, others probably are too. That's okay. The ArrayList idiom works well enough for now. Trevor |