コード例 #1
0
 /**
  * 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();
     }
 }
コード例 #2
0
 /**
  * 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();
     }
 }