Possible Duplicate:
Size-limited queue that holds last N elements in Java
Does java include a native class which allows a maximum number of elements and if I input one element more, it automatically removes an old one (e.g. based on natural sorting)?
If not, I can write it myself of course, but I just wanted to ask.