示例#1
0
 private function nextSatisfied()
 {
     while ($this->it->valid()) {
         if ($this->predicate->predicate($this->it->current(), $this->it->key())) {
             break;
         } else {
             $this->it->next();
         }
     }
 }
示例#2
0
 public function rewind()
 {
     $this->i = 0;
     $this->it->rewind();
     while ($this->it->valid()) {
         if ($this->predicate->predicate($this->it->current(), $this->it->key())) {
             $this->it->next();
         } else {
             break;
         }
     }
 }
示例#3
0
 public function valid()
 {
     return $this->it->valid() && $this->predicate->predicate($this->it->current(), $this->it->key());
 }