I'm sure this has already been done, but to practice understanding Data Structures better I decided to try making one of my own, given only an idea of what type of functionality I want, a pencil and some paper (as well as .txt file, modified into a .java file =p ).
The motivation of this Data-Structure is to enable a user (programmer) to be able to traverse through an array of data easily as if it were "circular." For example, if I want to jump back to the front of an array after reaching the index, to treat the data as if it were circular, how do I do it without reproducing code, again and again, to get there? This class solves that problem and acts like a collection-type by being "Iterable" (usable by the improved for-loop). Not only that, but the range and starting position can be adjusted so certain data can be ignored since as if it is "outside of the circle."
Note: I think I need to refer back to the Modulos discussions of my Discrete Mathematics book to determine how to give the user the positive-version (or close-enough value) of the negative request they submit when retrieving data in constant time.
A final note: This class is incomplete - I'm still working on it. I did not set a restriction of Comparable data types for nothing.
Thank you for viewing my code! =)