@Override
	public synchronized K remove(Object arg0)
	{
		if (!map.containsKey(arg0))
			return null;
		final LinkedEntry<T, K> p = map.remove(arg0);
		if (map.size() == 0)
		{
			head = null;
			tail = null;
			return p.second;
		}
		LinkedEntry<T, K> pn = p.next;
		while ((pn != null) && (tail != pn))
		{
			pn.index++;
			pn = pn.next;
		}
		if (head == p)
			head = p.next;
		if (tail == p)
			tail = p.prev;
		if (p.prev != null)
			p.prev.next = p.next;
		if (p.next != null)
			p.next.prev = p.prev;
		return p.second;
	}