Class Equivalence
java.lang.Object
org.graalvm.collections.Equivalence
Strategy for comparing two objects. Default predefined strategies are
DEFAULT
,
IDENTITY
, and IDENTITY_WITH_SYSTEM_HASHCODE
.- Since:
- 19.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Equivalence
Default equivalence callingObject.equals(Object)
to check equality andObject.hashCode()
for obtaining hash values.static final Equivalence
Identity equivalence using==
to check equality andObject.hashCode()
for obtaining hash values.static final Equivalence
Identity equivalence using==
to check equality andSystem.identityHashCode(Object)
for obtaining hash values. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Subclass for creating custom equivalence definitions. -
Method Summary
-
Field Details
-
DEFAULT
Default equivalence callingObject.equals(Object)
to check equality andObject.hashCode()
for obtaining hash values. Do not change the logic of this class as it may be inlined in other places.- Since:
- 19.0
-
IDENTITY
Identity equivalence using==
to check equality andObject.hashCode()
for obtaining hash values. Do not change the logic of this class as it may be inlined in other places.- Since:
- 19.0
-
IDENTITY_WITH_SYSTEM_HASHCODE
Identity equivalence using==
to check equality andSystem.identityHashCode(Object)
for obtaining hash values. Do not change the logic of this class as it may be inlined in other places.- Since:
- 19.0
-
-
Constructor Details
-
Equivalence
protected Equivalence()Subclass for creating custom equivalence definitions.- Since:
- 19.0
-
-
Method Details
-
equals
-
hashCode
-