public int remove( Object key ) { synchronized( mutex ) { return m.remove( key ); } } public void putAll( Map<? extends K, ? extends Integer> map ) {
/** * 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 Integer remove( Object key ) { int 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 ); } }
@Override public int remove( Object key ) { synchronized( mutex ) { return m.remove( key ); } } @Override
public int remove( Object key ) { synchronized( mutex ) { return m.remove( key ); } } public void putAll( Map<? extends K, ? extends Integer> map ) {
public void remove(Letter letter) { letters.remove(letter); }
public int remove( Object key ) { synchronized( mutex ) { return m.remove( key ); } } public void putAll( Map<? extends K, ? extends Integer> map ) {
public int remove( Object key ) { synchronized( mutex ) { return m.remove( key ); } } public void putAll( Map<? extends K, ? extends Integer> map ) {
@Override public O poll() { O node = super.poll(); index.remove(node); return node; }
@Override public E poll() { if(ties.isEmpty()) { return super.poll(); } else { E e = ties.remove(ties.size() - 1); index.remove(e); return e; } }
@Override public O replaceTopElement(O e) { O node = super.replaceTopElement(e); index.remove(node); return node; }
/** * Override element at position <code>id</code> with last element. * * @param id */ public E removeAt(int id) { if (id >= dta.size()) { return null; } E res = dta.get(id); idx.remove(res); E last = dta.remove(dta.size() - 1); // skip filling the hole if last is removed if (id < dta.size()) { idx.put(last, id); dta.set(id, last); } return res; }
@Override public void removeReaction(final Reaction<T> r) { final int index = indexes.get(r); final int last = tree.size() - 1; if (index == last) { tree.remove(index); indexes.remove(r); times.remove(index); } else { final Reaction<T> swapped = tree.get(last); indexes.put(swapped, index); tree.set(index, swapped); times.set(index, swapped.getTau()); tree.remove(last); times.remove(last); indexes.remove(r); updateEffectively(swapped, index); } }
/** * Removes the attribute at the provided index. If no attribute is found, nothing will be removed. * * @param index The index of the attribute to remove */ public void removeAttribute(int index) { attributes.remove(index); nameToIndex.remove(getAttributeName(index)); }
/** * 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 Integer remove( Object key ) { int 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 ); } }
/** * 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 Integer remove( Object key ) { int 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 ); } }
/** * 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 Integer remove( Object key ) { int 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 ); } }
/** * 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 */ @Override public Integer remove( Object key ) { int 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 ); } }
@Override public int test() { final TObjectIntMap<Integer> m_map = new TObjectIntHashMap<>( m_keys.length / 2 + 1, m_fillFactor ); int add = 0, remove = 0; while ( add < m_keys.length ) { m_map.put( m_keys[ add ], add ); ++add; m_map.put( m_keys[ add ], add ); ++add; m_map.remove( m_keys[ remove++ ] ); } return m_map.size(); } }
@Override public final int replace(String existing, String replacement) { final int index = indexMap.remove(existing); if (index == -1) { throw new IndexException("No match key for " + existing); } else { if (indexMap.containsKey(replacement)) { throw new IndexException("The replacement key already exists in index " + replacement); } else { final int ordinal = getOrdinalForIndex(index); this.indexMap.put(replacement, index); this.keyArray().setValue(ordinal, replacement); return index; } } }
@Override public final int replace(K existing, K replacement) { final int index = indexMap.remove(existing); if (index == -1) { throw new IndexException("No match key for " + existing); } else { if (indexMap.containsKey(replacement)) { throw new IndexException("The replacement key already exists in index " + replacement); } else { final int ordinal = getOrdinalForIndex(index); this.indexMap.put(replacement, index); this.keyArray().setValue(ordinal, replacement); return index; } } }