E lookup(Object object)

If an object equal to object is in the set, return it.

Checks if there is an object in the set that is equal to object. If so, that object is returned, otherwise returns null.

Source

E lookup(Object object) {
  if (!_validKey(object)) return null;
  int comp = _splay(object as dynamic/*=E*/);
  if (comp != 0) return null;
  return _root.key;
}