public function toArray($values = true)
    {
        if ($values) {
            $result = array();
            foreach ($this->_data as $state) {
                $result[$state->name] = $state->value;
            }
        } else {
            $result = $this->_data;
        }

        return $result;
    }