/** {@inheritDoc} */ public boolean equals( Object other ) { if ( ! ( other instanceof TDoubleObjectMap ) ) { return false; } TDoubleObjectMap that = ( TDoubleObjectMap ) other; if ( that.size() != this.size() ) { return false; } try { TDoubleObjectIterator iter = this.iterator(); while ( iter.hasNext() ) { iter.advance(); double key = iter.key(); Object value = iter.value(); if ( value == null ) { if ( !( that.get( key ) == null && that.containsKey( key ) ) ) { return false; } } else { if ( !value.equals( that.get( key ) ) ) { return false; } } } } catch ( ClassCastException ex ) { // unused. } return true; }
/** * {@inheritDoc} */ public boolean equals(final Object other) { if (!(other instanceof TDoubleObjectMap)) { return false; } final TDoubleObjectMap that = (TDoubleObjectMap) other; if (that.size() != this.size()) { return false; } try { final TDoubleObjectIterator iter = this.iterator(); while (iter.hasNext()) { iter.advance(); final double key = iter.key(); final Object value = iter.value(); if (value == null) { if (!(that.get(key) == null && that.containsKey(key))) { return false; } } else { if (!value.equals(that.get(key))) { return false; } } } } catch (final ClassCastException ex) { // unused. } return true; }
/** {@inheritDoc} */ @Override @SuppressWarnings("rawtypes") public boolean equals( Object other ) { if ( ! ( other instanceof TDoubleObjectMap ) ) { return false; } TDoubleObjectMap that = ( TDoubleObjectMap ) other; if ( that.size() != this.size() ) { return false; } try { TDoubleObjectIterator iter = this.iterator(); while ( iter.hasNext() ) { iter.advance(); double key = iter.key(); Object value = iter.value(); if ( value == null ) { if ( !( that.get( key ) == null && that.containsKey( key ) ) ) { return false; } } else { if ( !value.equals( that.get( key ) ) ) { return false; } } } } catch ( ClassCastException ex ) { // unused. } return true; }
/** {@inheritDoc} */ public TDoubleObjectIterator<V> iterator() { return new TDoubleObjectHashIterator<V>( this ); }
/** * {@inheritDoc} */ public TDoubleObjectIterator<V> iterator() { return new TDoubleObjectHashIterator<>(this); }
/** {@inheritDoc} */ @Override public TDoubleObjectIterator<V> iterator() { return new TDoubleObjectHashIterator( this ); }
/** * Returns a <tt>TDoubleObjectIterator</tt> with access to this map's keys and values. * * @return a <tt>TDoubleObjectIterator</tt> with access to this map's keys and values. */ public TDoubleObjectIterator<V> iterator();
/** * Returns a <tt>TDoubleObjectIterator</tt> with access to this map's keys and values. * * @return a <tt>TDoubleObjectIterator</tt> with access to this map's keys and values. */ TDoubleObjectIterator<V> iterator();