net.walend.lyophil.collection
Class MapToFreezablesIdentitor

java.lang.Object
  |
  +--net.walend.lyophil.collection.MapToFreezablesIdentitor
All Implemented Interfaces:
Identitor, Immutable

public final class MapToFreezablesIdentitor
extends java.lang.Object
implements Identitor, Immutable

This class implements Identitor using an object's own equals() and hashCode() methods for equals() and hashCode(), but checks for equal identifiers of freezables insice the valueEquals() method.

Since:
20010707
Author:
David Walend

Constructor Summary
MapToFreezablesIdentitor()
           
 
Method Summary
 boolean equals(java.lang.Object ob1, java.lang.Object ob2)
          This method uses an object's own equals() method after first checking for nulls.
 int hashCode(java.lang.Object ob)
          Return a hash code for ob using ob's hashCode method.
 boolean valueEquals(java.lang.Object ob1, java.lang.Object ob2)
          Delegate to the equals method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapToFreezablesIdentitor

public MapToFreezablesIdentitor()
Method Detail

equals

public boolean equals(java.lang.Object ob1,
                      java.lang.Object ob2)
This method uses an object's own equals() method after first checking for nulls.

Specified by:
equals in interface Identitor

hashCode

public int hashCode(java.lang.Object ob)
Return a hash code for ob using ob's hashCode method.

Specified by:
hashCode in interface Identitor

valueEquals

public boolean valueEquals(java.lang.Object ob1,
                           java.lang.Object ob2)
Delegate to the equals method.

Specified by:
valueEquals in interface Identitor


Copyright (c) 2000, 2001, David Walend