Package org.thymeleaf.util
Class IdentityCounter<T>
- java.lang.Object
-
- org.thymeleaf.util.IdentityCounter<T>
-
- Type Parameters:
T- The type of the objects being counted
- All Implemented Interfaces:
java.io.Serializable
public final class IdentityCounter<T> extends java.lang.Object implements java.io.SerializablePurpose-specific set that can tell whether an object (by reference) has already been added to it.
Objects of this class are not thread-safe.
- Since:
- 2.0.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.IdentityHashMap<T,java.lang.Object>countedprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description IdentityCounter(int expectedMaxSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcount(T object)booleanisAlreadyCounted(T object)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
counted
private final java.util.IdentityHashMap<T,java.lang.Object> counted
-
-