public function set(int $offset, Period $interval): void
    {
        $this->get($offset);
        $this->intervals[$offset] = $interval;
    }
public function set(int $offset, Period $interval): void
    {
        $this->get($offset);
        $this->intervals[$offset] = $interval;
    }
public function set ( int $ offset , Period $ interval ) : void { $ this -> get ( $ offset ) ; $ this -> intervals [ $ offset ] = $ interval ; }
Updates the interval at the specify offset.

@throws InvalidIndex If the offset is illegal for the current sequence.
Updates the interval at the specify offset .