public function toArray() {
        $result = [];
        $count  = count($this->elements);
        for ($i=0;$i<$count;$i++) {
            $result[] = $this->elements[$i];
        }
        return $result;
    }