Package org.apache.sis.metadata
Class ObjectPair
java.lang.Object
org.apache.sis.metadata.ObjectPair
A pair of objects in process of being compared by the
MetadataStandard.equals(…)
method.
We have to remember those pairs for avoiding infinite recursivity when comparing metadata objects
having cyclic associations. The objects are compared using the identity comparison.
Object order is not significant.- Since:
- 0.3
- Version:
- 0.3
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final ThreadLocal
<Set<ObjectPair>> The set of objects currently in process of being compared.private final Object
The pair of objects in process of being compared.private final Object
The pair of objects in process of being compared. -
Constructor Summary
ConstructorsConstructorDescriptionObjectPair
(Object o1, Object o2) Creates a new pair of objects being compared. -
Method Summary
-
Field Details
-
CURRENT
The set of objects currently in process of being compared. -
o1
The pair of objects in process of being compared. -
o2
The pair of objects in process of being compared.
-
-
Constructor Details
-
ObjectPair
Creates a new pair of objects being compared.
-
-
Method Details
-
hashCode
public int hashCode()Returns a hash code value for this pair of objects. The hash code value shall be insensitive to the objects order. -
equals
Compares the given object with this pair for equality. The comparison shall be insensitive to the objects order. -
toString
Returns a string representation of the object pair for debugging purpose only.
-