public class RecursionGuard<T>
extends java.lang.Object
A simple guard against infinite recursion.
Can be used as a stack or a sink. It uses identity comparison to detect
recursion.
It is designed to cause minimal overhead for recursive structures that
are not deeper than approx 15 elements and has less elements in the average case.
- Author:
- Sebastian Zarnekow - Initial contribution and API