What is the most elegant and simple way to implement a circular list, FIFO style? I'm looking for a solution that doesn't resort to hacks like catching exceptions.
No, this is not for homework.
For a little background, I want to use a circular list within GWT; so using a 3rd party lib is not what I want.
Edit: In order to clarify, I referred to FIFO because I basically need a cache. Instead of expiring by oldest/youngest/whatsoever, I thought on evicting the first inserted element, but a circular list already gives me that :) So ignore the FIFO stuff.