*/
public boolean equals( Object other ) {
if ( ! ( other instanceof TObjectDoubleMap ) ) {
return false;
}
TObjectDoubleMap that = ( TObjectDoubleMap ) other;
if ( that.size() != this.size() ) {
return false;
}
try {
TObjectDoubleIterator iter = this.iterator();
while ( iter.hasNext() ) {
iter.advance();
Object key = iter.key();
double value = iter.value();
if ( value == no_entry_value ) {
if ( !( that.get( key ) == that.getNoEntryValue() &&
that.containsKey( key ) ) ) {
return false;
}
} else {
if ( value != that.get( key ) ) {
return false;
}
}
}
} catch ( ClassCastException ex ) {