com.croftsoft.core.util
Class HashtableLib

java.lang.Object
  extended by com.croftsoft.core.util.HashtableLib

public class HashtableLib
extends Object

Static method library to manipulate Hashtable objects.

Version:
1998-10-04
Author:
David Wallace Croft

Method Summary
static Hashtable hashtableDelta(Hashtable oldHashtable, Hashtable newHashtable)
          Creates a Hashtable of just the new and updated elements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hashtableDelta

public static Hashtable hashtableDelta(Hashtable oldHashtable,
                                       Hashtable newHashtable)
Creates a Hashtable of just the new and updated elements.

Returns a Hashtable containing those elements in the new Hashtable that were not in the old Hashtable plus those elements in new Hashtable that were in the old Hashtable but with different values.

Assumes that the Hashtable value objects have overridden their equals() method for comparison.

Returns:
Key and value objects returned are shared from the newHashtable. Returns null if newHashtable is null. Returns a shallow clone of newHashtable if oldHashtable is null.

CroftSoft Javadoc

CroftSoft Core Javadoc (2008-09-28 20:58:02)