It would be great to document this class a bit more. It has the potential to be useful in many other places. Besides functionality, algorithmic complexity hints on each method would be very useful too.