PHP version: 5
Required modules:
standard
Required packages:
autoload.php, AutoloadException.php, Comparable.php
interface it\icosaedro\containers\Hashable
|
`--(it\icosaedro\containers\Comparable)
Objects that may be compared for equality and that may be hashed should implement this interface
Version: $Date: 2012/01/28 20:27:32 $
Author: Umberto Salsi <salsi@icosaedro.it>
Hashing allows to implement fast algorithms of data search, as the HashSet and the HashMap.
{
int getHash()Returns the hash of the object
The hash value must be consistent with the equality test, that is if two distinct objects carries the same value, then the resulting hash must be the same: if
$a->equals($b)then$a->getHash() === $b->getHash()must be true as well. Also remember that if two objects result to be equal to each other, then the hash value must be the same. Moreover, the objects, once defined, must be immutable, so that the hash of a given object never change.Return: The hash.
boolean equals(
object $other)
inherited fromit\icosaedro\containers\Comparable
}
Generated by PHPLint Documentator