implement missing methods of WeakCollection and WeakValueDictionary