/** * Compares this map with another map for equality of their stored * entries. * * @param other an <code>Object</code> value * @return a <code>boolean</code> value */ public boolean equals( Object other ) { if ( ! ( other instanceof TObjectShortMap ) ) { return false; } TObjectShortMap that = ( TObjectShortMap ) other; if ( that.size() != this.size() ) { return false; } try { TObjectShortIterator iter = this.iterator(); while ( iter.hasNext() ) { iter.advance(); Object key = iter.key(); short 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 ) { // unused. } return true; }
/** * Compares this map with another map for equality of their stored * entries. * * @param other an <code>Object</code> value * @return a <code>boolean</code> value */ @Override @SuppressWarnings("rawtypes") public boolean equals( Object other ) { if ( ! ( other instanceof TObjectShortMap ) ) { return false; } TObjectShortMap that = ( TObjectShortMap ) other; if ( that.size() != this.size() ) { return false; } try { TObjectShortIterator iter = this.iterator(); while ( iter.hasNext() ) { iter.advance(); Object key = iter.key(); short 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 ) { // unused. } return true; }
/** * @return an iterator over the entries in this map */ public TObjectShortIterator<K> iterator() { return new TObjectShortHashIterator<K>( this ); }
/** * @return an iterator over the entries in this map */ @Override public TObjectShortIterator<K> iterator() { return new TObjectShortHashIterator( this ); }
public TObjectShortIterator<String> iterator() { return container.iterator(); }
public TObjectShortIterator<K> iterator() { return container.iterator(); }
/** * Returns a <tt>TObjectShortIterator</tt> with access to this map's keys and values. * * @return a <tt>TObjectShortIterator</tt> with access to this map's keys and values. */ public TObjectShortIterator<K> iterator();