Class DuoMapKey


  • public class DuoMapKey
    extends java.lang.Object
    Represent a map key that consists of two value
    Author:
    TiongHiang Lee (thlee@onemindsoft.org)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int _hashCode  
      private java.lang.Object key1
      key1
      private java.lang.Object key2
      key2
    • Constructor Summary

      Constructors 
      Constructor Description
      DuoMapKey​(java.lang.Object key1, java.lang.Object key2)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private boolean _keyEquals​(java.lang.Object key, java.lang.Object other)
      Return whether key and other is equals
      boolean equals​(java.lang.Object o)
      int hashCode()
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • _hashCode

        private final int _hashCode
      • key1

        private java.lang.Object key1
        key1
      • key2

        private java.lang.Object key2
        key2
    • Constructor Detail

      • DuoMapKey

        public DuoMapKey​(java.lang.Object key1,
                         java.lang.Object key2)
        Constructor
        Parameters:
        key1 -
        key2 -
    • Method Detail

      • hashCode

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

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • _keyEquals

        private boolean _keyEquals​(java.lang.Object key,
                                   java.lang.Object other)
        Return whether key and other is equals
        Parameters:
        key - the key
        other - the other key
        Returns:
        true if both null or equals