/** * Constructs a ChainedHashTable with the given length. * * @param integer $length The length of this hash table. */ public function __construct($length = 0) { parent::__construct(); $this->array = new BasicArray($length); for ($i = 0; $i < $length; ++$i) { $this->array[$i] = new LinkedList(); } }
/** * Constructs a ChainedScatterTable with the given length. * * @param integer $length The length of this hash table. */ public function __construct($length = 0) { parent::__construct(); $this->array = new BasicArray($length); for ($i = 0; $i < $length; ++$i) { $this->array[$i] = new ChainedScatterTable_Entry(); } }