Class VObjectInternal.EqualsPair

java.lang.Object
eu.mihosoft.vmf.runtime.core.internal.VObjectInternal.EqualsPair
Enclosing interface:
VObjectInternal

public static class VObjectInternal.EqualsPair
extends java.lang.Object
The purpose of this class is to store a pair of objects used for equals(). This class's equals() method checks equality by object identity. Same for hashCode() which uses identity hashes of 'first' and 'second' to compute the hash. This class can be used in conjunction with a regular HashMap to get similar results to an IdentityHashMap, except that in this case identity pairs can be used. And we don't have to use a map implementation that is deliberately broken by design.
  • Constructor Summary

    Constructors 
    Constructor Description
    EqualsPair​(java.lang.Object first, java.lang.Object second)  
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object obj)  
    int hashCode()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EqualsPair

      public EqualsPair​(java.lang.Object first, java.lang.Object second)
  • Method Details

    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • equals

      public boolean equals​(java.lang.Object obj)
      Overrides:
      equals in class java.lang.Object