/** {@inheritDoc} */ public boolean equals( Object other ) { if ( ! ( other instanceof TByteObjectMap ) ) { return false; } TByteObjectMap that = ( TByteObjectMap ) other; if ( that.size() != this.size() ) { return false; } try { TByteObjectIterator iter = this.iterator(); while ( iter.hasNext() ) { iter.advance(); byte 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} */ @Override @SuppressWarnings("rawtypes") public boolean equals( Object other ) { if ( ! ( other instanceof TByteObjectMap ) ) { return false; } TByteObjectMap that = ( TByteObjectMap ) other; if ( that.size() != this.size() ) { return false; } try { TByteObjectIterator iter = this.iterator(); while ( iter.hasNext() ) { iter.advance(); byte 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 TByteObjectIterator<V> iterator() { return new TByteObjectHashIterator<V>( this ); }
/** {@inheritDoc} */ @Override public TByteObjectIterator<V> iterator() { return new TByteObjectHashIterator( this ); }
public TByteObjectIterator<V> iterator() { return container.iterator(); }
public TByteObjectIterator<String> iterator() { return container.iterator(); }
/** * Returns a <tt>TByteObjectIterator</tt> with access to this map's keys and values. * * @return a <tt>TByteObjectIterator</tt> with access to this map's keys and values. */ public TByteObjectIterator<V> iterator();