Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3509 Members - Latest Member: lioneltenel

26. May 2012, 11:34:23 pm
Xith3D CommunityXith3D InternalsDeveloper discussion (Moderators: Marvin Fröhlich, 'n ddrylliog)Class name question
Pages: [1]
Print
Author Topic: Class name question  (Read 838 times)
horati
Global Moderator
Getting respectable
*****
Offline Offline

Posts: 393


View Profile
« on: 12. July 2007, 04:07:24 pm »

It took me a few minutes to discover that the CircleArray class is really an array-based round-robin queue instead of an array of circles.  What do you think about implementing java.util.Queueu and renaming it to something like RoundRobinQueue?
Logged

Kevin
"It may not seem like a big deal, but ignorance of character encoding issues leads to insidious code rot akin to y2k."
http://stackoverflow.com/users/3474/sylvarking
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #1 on: 12. July 2007, 07:11:56 pm »

It took me a few minutes to discover that the CircleArray class is really an array-based round-robin queue instead of an array of circles.  What do you think about implementing java.util.Queueu and renaming it to something like RoundRobinQueue?

No. Implementing Queue would mean to implement dozens of unnecessary methods. Additionally, this implementation does not auto-grow. So the expected behavior is a little bit different. The miss of auto-growing is necessary to save the need of synchronization. Additionally it is more like a Stack, than like a Queue.

I have renamed it to CircularArray, moved it to org.xith3d.utility.general and extended its JavaDoc to explain more, what it is and does.

Marvin
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic