public MySet Merge(MySet other) { if (other == null) { return(this); } other = other.Find(); var me = this.Find(); if (other == me) { return(other); } if (other.Size > me.Size) { me.Root = other; other.Size += me.Size; me.Size = other.Size; return(other); } else { other.Root = me; me.Size += other.Size; other.Size = me.Size; return(me); } }
public TEntity Find(object key) { return(MySet.Find(key)); }