net.walend.collection
Class DefaultIdentitor

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

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

This class implements Identitor using an object's own equals() and hashCode() methods.

Since:
20010707
Author:
David Walend

Constructor Summary
DefaultIdentitor()
           
 
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

DefaultIdentitor

public DefaultIdentitor()
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