/** {@inheritDoc} */ public boolean equals( Object other ) { if ( ! ( other instanceof TFloatObjectMap ) ) { return false; } TFloatObjectMap that = ( TFloatObjectMap ) other; if ( that.size() != this.size() ) { return false; } try { TFloatObjectIterator iter = this.iterator(); while ( iter.hasNext() ) { iter.advance(); float 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; }
public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException { // VERSION in.readByte(); // MAP //noinspection unchecked _map = ( TFloatObjectMap<V> ) in.readObject(); }
/** {@inheritDoc} */ @Override @SuppressWarnings("rawtypes") public boolean equals( Object other ) { if ( ! ( other instanceof TFloatObjectMap ) ) { return false; } TFloatObjectMap that = ( TFloatObjectMap ) other; if ( that.size() != this.size() ) { return false; } try { TFloatObjectIterator iter = this.iterator(); while ( iter.hasNext() ) { iter.advance(); float 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; }
@Override @SuppressWarnings("unchecked") public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException { // VERSION in.readByte(); // MAP //noinspection unchecked _map = ( TFloatObjectMap<V> ) in.readObject(); }
/** {@inheritDoc} */ public void putAll( TFloatObjectMap<? extends V> map ){ map.forEachEntry( PUT_ALL_PROC ); }
/** {@inheritDoc} */ @Override public void putAll( TFloatObjectMap<? extends V> map ){ map.forEachEntry( PUT_ALL_PROC ); }
/** {@inheritDoc} */ public void putAll( TFloatObjectMap<V> map ){ map.forEachEntry( PUT_ALL_PROC ); }
public TFloatObjectMap<V> getMap() { return container; }
public TFloatObjectMap<String> getMap() { return container; }
/** * Creates a new <code>TFloatObjectHashMap</code> that contains the entries * in the map passed to it. * * @param map the <tt>TFloatObjectMap</tt> to be copied. */ public TFloatObjectHashMap( TFloatObjectMap<? extends V> map ) { this( map.size(), 0.5f, map.getNoEntryKey() ); putAll( map ); }
/** * Creates a wrapper that decorates the specified primitive map. * * @param map the <tt>TFloatObjectMap</tt> to wrap. */ public TFloatObjectMapDecorator( TFloatObjectMap<V> map ) { super(); this._map = map; }
/** * Returns a reference to the map wrapped by this decorator. * * @return the wrapped <tt>TFloatObjectMap</tt> instance. */ public TFloatObjectMap<V> getMap() { return _map; }
/** * Creates a new <code>TFloatObjectHashMap</code> that contains the entries * in the map passed to it. * * @param map the <tt>TFloatObjectMap</tt> to be copied. */ public TFloatObjectHashMap( TFloatObjectMap<V> map ) { this( map.size(), 0.5f, map.getNoEntryKey() ); putAll( map ); }