AbstractSet.toHash

Returns the hash code value for this set. The hash code of a set is defined to be the sum of the hash codes of the elements in the set, where the hash code of a <tt>null</tt> element is defined to be zero. This ensures that <tt>s1.equals(s2)</tt> implies that <tt>s1.toHash()==s2.toHash()</tt> for any two sets <tt>s1</tt> and <tt>s2</tt>, as required by the general contract of {@link Object#hashCode}.

<p>This implementation iterates over the set, calling the <tt>hashCode</tt> method on each element in the set, and adding up the results.

@return the hash code value for this set @see Object#equals(Object) @see Set#equals(Object)

class AbstractSet(E)
override @trusted nothrow
size_t
toHash
()

Meta