Lines Matching refs:key
33 public function contains(Hashable $key) : bool argument
35 $hash = $this->equivalence->hash($key);
42 if ($this->equivalence->equivalent($key, $entryKey)) {
53 public function get(Hashable $key) argument
55 $hash = $this->equivalence->hash($key);
62 if ($this->equivalence->equivalent($key, $entryKey)) {
73 public function put(Hashable $key, $value) : void argument
75 $hash = $this->equivalence->hash($key);
82 if ($this->equivalence->equivalent($key, $entryKey)) {
83 $this->table[$hash][$index] = [$key, $value];
89 $this->table[$hash][] = [$key, $value];
94 public function remove(Hashable $key) : void argument
96 $hash = $this->equivalence->hash($key);
103 if (!$this->equivalence->equivalent($key, $entryKey)) {
138 foreach ($bucket as $index => [$key, $value]) {
141 if (!$this->equivalence->equivalent($key, $otherKey)
158 foreach ($bucket as [$key]) {
159 $values[] = $key;
184 foreach ($bucket as [$key, $value]) {
185 yield $key => $value;