net.walend.lyophil.collection
Class FreezableIdentitor

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

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

An Identitor for Freezables.

Since:
20010712
Author:
David Walend

Constructor Summary
FreezableIdentitor()
           
 
Method Summary
 boolean equals(java.lang.Object ob1, java.lang.Object ob2)
          If two Freezables have equal identifiers, this method returns true.
 int hashCode(java.lang.Object ob1)
          If the Object is null, returns 0.
 boolean valueEquals(java.lang.Object ob1, java.lang.Object ob2)
          If two Freezables have equal identifiers, this method returns true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FreezableIdentitor

public FreezableIdentitor()
Method Detail

equals

public boolean equals(java.lang.Object ob1,
                      java.lang.Object ob2)
If two Freezables have equal identifiers, this method returns true. If both are null, this method returns true.

Specified by:
equals in interface Identitor
Throws:
a - ClassCastException if either Object is not a Freezable.

hashCode

public int hashCode(java.lang.Object ob1)
If the Object is null, returns 0. If the Object is a Freezable, returns the identifier's hashCode.

Specified by:
hashCode in interface Identitor
Throws:
java.lang.ClassCastException - if ob1 is not a Freezable.

valueEquals

public boolean valueEquals(java.lang.Object ob1,
                           java.lang.Object ob2)
If two Freezables have equal identifiers, this method returns true. If both are null, this method returns true.

Specified by:
valueEquals in interface Identitor
Throws:
a - ClassCastException if either Object is not a Freezable.


Copyright (c) 2000, 2001, David Walend