Code example for WeakHashMap

Methods: remove

0
        return result;
    } 
 
    @Override 
    public void removeItem(int id) {
        mNativeMap.remove(mNativeMenu.findItem(id));
        mNativeMenu.removeItem(id);
    } 
 
    @Override 
    public void removeGroup(int groupId) {
        for (int i = 0; i < mNativeMenu.size(); i++) {
            final android.view.MenuItem item = mNativeMenu.getItem(i);
            if (item.getGroupId() == groupId) {
                mNativeMap.remove(item);
            } 
        } 
        mNativeMenu.removeGroup(groupId);
    } 
 
Connect your IDE to all the code out there  Get Codota for Java