On Thu, 20 Sep 2001 17:24, Michael McKibben wrote: > In looking at the code for CircularBuffer I was quite surprised in learning > that the circular buffer grows by factor of 2 instead of wrapping around on > itself when the content size is > buffer size.
yep. > I don't see any benefits with the current behavior over an ArrayList. about the only advantage is that when you get something from the front of buffer it doesn't cause an array copy like ArrayList would. > Do I > not understand correctly the intent of the CircularBuffer class? Also it > seems odd that the CircularBuffer does not implement the > java.util.Collection interface. Is this a legacy class that predates > java.util.Collections? Thanks, This class is ancient and not actually used anywhere in Avalon so no one has actually worked to implement a Collections interface on it ;) -- Cheers, Pete --------------------------------------------------- "It is easy to dodge our responsibilities, but we cannot dodge the consequences of dodging our responsibilities." -Josiah Stamp --------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
