ConnectedComponent: hashValue and == to support similar functions in Slice