@Override
    public V put(K key, V value) {
      if (shouldCompare(key.getClass())) {
        return comparedMap.put(key, value);
      } else {
        return identityMap.put(key, value);
      }
    }
Specialized class which can compare by identity or value; based on the key type.
ql/src/java/org/apache/hadoop/hive/ql/plan/mapper/PlanMapper.java