T - the generic typepublic class EqualsCache<T extends HasEqualsCache>
extends java.lang.Object
It is required that classes implementing this interface in the equals method are marked with the HasEqualsCache in the class definition
This class is thread safe
| Modifier and Type | Class and Description | 
|---|---|
| static interface  | EqualsCache.Equals<Z>Required interface for the lambda method to compare two objects. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | clear()Removes all cached values. | 
| boolean | equals(T o1,
      T o2,
      EqualsCache.Equals<T> method)Use this method to compare equals of two objects of T type. | 
| static <Z extends HasEqualsCache> | newInstance()Factory method to create a new instance of the EqualsCache class. | 
| static <Z extends HasEqualsCache> | newInstance(int capacity)Factory method to create a new instance of the EqualsCache class. | 
| void | remove(HasEqualsCache o)Use this method to remove a object from the cache. | 
public boolean equals(T o1, T o2, EqualsCache.Equals<T> method)
o1 - first object to compareo2 - second object to comparemethod - the lambda method to compare two instances of Tpublic void remove(HasEqualsCache o)
o - object to removepublic static <Z extends HasEqualsCache> EqualsCache<Z> newInstance()
Z - the generic typepublic static <Z extends HasEqualsCache> EqualsCache<Z> newInstance(int capacity)
Z - the generic typecapacity - maximum pairs of values stored in the cachepublic void clear()
Copyright 2006-2015 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa