コード例 #1
0
ファイル: Queue.php プロジェクト: YuraMalahov/algorithms
 /**
  * @inheritdoc
  */
 public function next()
 {
     if (!$this->valid()) {
         $this->last = null;
     }
     $this->length--;
     $this->current = $this->current->getRight();
 }
コード例 #2
0
ファイル: Stack.php プロジェクト: YuraMalahov/algorithms
 /**
  * @inheritdoc
  */
 public function next()
 {
     $this->length--;
     $this->current = $this->current->getRight();
 }