src/Peach/Util/HashMap.php
public function put($key, $value)
    {
        $index = $this->getIndexOf($key);
        if (!isset($this->table[$index])) {
            $this->table[$index] = array();
        }
        foreach ($this->table[$index] as $entry) {
            if ($entry->keyEquals($key, $this->equator)) {
                $entry->setValue($value);
                $this->modFlag = true;
                return;
            }
        }
        $this->table[$index][] = $this->createEntry($key, $value);
        $this->modFlag = true;
    }
public function put($key, $value)
    {
        $index = $this->getIndexOf($key);
        if (!isset($this->table[$index])) {
            $this->table[$index] = array();
        }
        foreach ($this->table[$index] as $entry) {
            if ($entry->keyEquals($key, $this->equator)) {
                $entry->setValue($value);
                $this->modFlag = true;
                return;
            }
        }
        $this->table[$index][] = $this->createEntry($key, $value);
        $this->modFlag = true;
    }
指定されたキーと値をこの Map に関連づけます.
@param mixed $key   キー
@param mixed $value 値