michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: /** michael@0: * Represents an object that can be stored in a hashtable. michael@0: */ michael@0: [scriptable, uuid(17e595fa-b57a-4933-bd0f-b1812e8ab188)] michael@0: interface nsIHashable : nsISupports michael@0: { michael@0: /** michael@0: * Is this object the equivalent of the other object? michael@0: */ michael@0: boolean equals(in nsIHashable aOther); michael@0: michael@0: /** michael@0: * A generated hashcode for this object. Objects that are equivalent michael@0: * must have the same hash code. Getting this property should never michael@0: * throw an exception! michael@0: */ michael@0: readonly attribute unsigned long hashCode; michael@0: };