public long getNoEntryValue() { return m.getNoEntryValue(); }
public long getNoEntryValue() { return m.getNoEntryValue(); }
/** * Retrieves the value for <tt>key</tt> * * @param key an <code>Object</code> value * @return the value of <tt>key</tt> or null if no such mapping exists. */ public Long get( Object key ) { long v = _map.get( key ); // There may be a false positive since primitive maps // cannot return null, so we have to do an extra // check here. if ( v == _map.getNoEntryValue() ) { return null; } else { return wrapValue( v ); } }
/** * Deletes a key/value pair from the map. * * @param key an <code>Object</code> value * @return the removed value, or Integer(0) if it was not found in the map */ public Long remove( Object key ) { long v = _map.remove( key ); // There may be a false positive since primitive maps // cannot return null, so we have to do an extra // check here. if ( v == _map.getNoEntryValue() ) { return null; } else { return wrapValue( v ); } }
/** * Creates a new <code>TObjectLongHashMap</code> that contains the entries * in the map passed to it. * * @param map the <tt>TObjectLongMap</tt> to be copied. */ public TObjectLongHashMap( TObjectLongMap<? extends K> map ) { this( map.size(), 0.5f, map.getNoEntryValue() ); if ( map instanceof TObjectLongHashMap ) { TObjectLongHashMap hashmap = ( TObjectLongHashMap ) map; this._loadFactor = hashmap._loadFactor; this.no_entry_value = hashmap.no_entry_value; //noinspection RedundantCast if ( this.no_entry_value != ( long ) 0 ) { Arrays.fill( _values, this.no_entry_value ); } setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); } putAll( map ); }
/** * Creates a new <code>TObjectLongCustomHashMap</code> that contains the entries * in the map passed to it. * * @param map the <tt>TObjectLongMap</tt> to be copied. */ public TObjectLongCustomHashMap( HashingStrategy<? super K> strategy, TObjectLongMap<? extends K> map ) { this( strategy, map.size(), 0.5f, map.getNoEntryValue() ); if ( map instanceof TObjectLongCustomHashMap ) { TObjectLongCustomHashMap hashmap = ( TObjectLongCustomHashMap ) map; this._loadFactor = hashmap._loadFactor; this.no_entry_value = hashmap.no_entry_value; this.strategy = hashmap.strategy; //noinspection RedundantCast if ( this.no_entry_value != ( long ) 0 ) { Arrays.fill( _values, this.no_entry_value ); } setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); } putAll( map ); }
/** * Inserts a key/value pair into the map. * * @param key an <code>Object</code> value * @param value an <code>Long</code> value * @return the previous value associated with <tt>key</tt>, * or Integer(0) if none was found. */ public Long put( K key, Long value ) { if ( value == null ) return wrapValue( _map.put( key, _map.getNoEntryValue() ) ); return wrapValue( _map.put( key, unwrapValue( value ) ) ); }
long value = iter.value(); if ( value == no_entry_value ) { if ( !( that.get( key ) == that.getNoEntryValue() && that.containsKey( key ) ) ) {
long value = iter.value(); if ( value == no_entry_value ) { if ( !( that.get( key ) == that.getNoEntryValue() && that.containsKey( key ) ) ) {
public long getNoEntryValue() { return m.getNoEntryValue(); }
public long getNoEntryValue() { return m.getNoEntryValue(); }
public long getNoEntryValue() { return m.getNoEntryValue(); }
@Override public long getNoEntryValue() { return m.getNoEntryValue(); }
@Override public long getNoEntryValue() { return m.getNoEntryValue(); }
/** * Deletes a key/value pair from the map. * * @param key an <code>Object</code> value * @return the removed value, or Integer(0) if it was not found in the map */ public Long remove( Object key ) { long v = _map.remove( key ); // There may be a false positive since primitive maps // cannot return null, so we have to do an extra // check here. if ( v == _map.getNoEntryValue() ) { return null; } else { return wrapValue( v ); } }
/** * Retrieves the value for <tt>key</tt> * * @param key an <code>Object</code> value * @return the value of <tt>key</tt> or null if no such mapping exists. */ public Long get( Object key ) { long v = _map.get( key ); // There may be a false positive since primitive maps // cannot return null, so we have to do an extra // check here. if ( v == _map.getNoEntryValue() ) { return null; } else { return wrapValue( v ); } }
/** * Inserts a key/value pair into the map. * * @param key an <code>Object</code> value * @param value an <code>Long</code> value * @return the previous value associated with <tt>key</tt>, * or Integer(0) if none was found. */ public Long put( K key, Long value ) { if ( value == null ) return wrapValue( _map.put( key, _map.getNoEntryValue() ) ); return wrapValue( _map.put( key, unwrapValue( value ) ) ); }
/** * Inserts a key/value pair into the map. * * @param key an <code>Object</code> value * @param value an <code>Long</code> value * @return the previous value associated with <tt>key</tt>, * or Integer(0) if none was found. */ public Long put( K key, Long value ) { if ( value == null ) return wrapValue( _map.put( key, _map.getNoEntryValue() ) ); return wrapValue( _map.put( key, unwrapValue( value ) ) ); }
/** * Inserts a key/value pair into the map. * * @param key an <code>Object</code> value * @param value an <code>Long</code> value * @return the previous value associated with <tt>key</tt>, * or Integer(0) if none was found. */ public Long put( K key, Long value ) { if ( value == null ) return wrapValue( _map.put( key, _map.getNoEntryValue() ) ); return wrapValue( _map.put( key, unwrapValue( value ) ) ); }
/** * Inserts a key/value pair into the map. * * @param key an <code>Object</code> value * @param value an <code>Long</code> value * @return the previous value associated with <tt>key</tt>, * or Integer(0) if none was found. */ @Override public Long put( K key, Long value ) { if ( value == null ) return wrapValue( _map.put( key, _map.getNoEntryValue() ) ); return wrapValue( _map.put( key, unwrapValue( value ) ) ); }