Iterator as import source
@param \Iterator $iterator
@param int $start
@param int $end
971833
public function setIteratorSource(\Iterator $iterator=null, $start=0, $end=-1)
    {
        $this->iteratorstartindex = (int)$start;
        $this->iteratorendindex = (int)$end;
        $this->iterator = $iterator;
    }
192356
public function subList(int $start, int $end): ArrayList {
        $arrayList = new ArrayList();
        if (($start === $end) || ($start > $end)) {
            return $arrayList;
        }
        //TODO preserve keys?
        $array = \array_slice($this->array, $start, $end - $start, true);
        $arrayList->addAllArray($array);
        return $arrayList;
    }
1036860
public function notBetween($field, $start, $end) {
        $this->add($field, Expr::NOT_BETWEEN, [$start, $end]);

        return $this;
    }
1196746
public static function fromString($startTime, $endTime)
    {
        return new self(Time::fromString($startTime), Time::fromString($endTime));
    }
366281
public function between($field, $start, $end) {
        $this->add($field, Expr::BETWEEN, [$start, $end]);

        return $this;
    }
459280
public function subSequence(int $start, int $end) {
        $arrayList = $this->arrayList->subList($start, $end);
        $stringBuilder = $this->arrayListToStringBuilder($arrayList);
        return $stringBuilder;
    }
70874
public static function fromProtobuf($input, $object = NULL, &$start = 0, $end = NULL)
	{
		if ($object === null) {
			$object = new CodeGeneratorRequest();
		}

		if ($end === null) {
			$end = strlen($input);
		}

		while ($start < $end) {
			$tag = Binary::decodeVarint($input, $start);
			$wireType = $tag & 0x7;
			$number = $tag >> 3;
			switch ($number) {
				case 1:
					if ($wireType !== 2) {
						throw new ProtobufException('Unexpected wire type ' . $wireType . ', expected 2.', $number);
					}
					if (!(isset($object->fileToGenerate) && is_array($object->fileToGenerate))) {
						$object->fileToGenerate = array();
					}
					$length = Binary::decodeVarint($input, $start);
					$expectedStart = $start + $length;
					if ($expectedStart > $end) {
						throw new ProtobufException('Not enough data.');
					}
					$object->fileToGenerate[] = substr($input, $start, $length);
					$start += $length;
					if ($start !== $expectedStart) {
						throw new ProtobufException('Unexpected start. Expected ' . $expectedStart . ', got ' . $start . '.', $number);
					}
					break;
				case 2:
					if ($wireType !== 2) {
						throw new ProtobufException('Unexpected wire type ' . $wireType . ', expected 2.', $number);
					}
					$length = Binary::decodeVarint($input, $start);
					$expectedStart = $start + $length;
					if ($expectedStart > $end) {
						throw new ProtobufException('Not enough data.');
					}
					$object->parameter = substr($input, $start, $length);
					$start += $length;
					if ($start !== $expectedStart) {
						throw new ProtobufException('Unexpected start. Expected ' . $expectedStart . ', got ' . $start . '.', $number);
					}
					break;
				case 15:
					if ($wireType !== 2) {
						throw new ProtobufException('Unexpected wire type ' . $wireType . ', expected 2.', $number);
					}
					if (!(isset($object->protoFile) && is_array($object->protoFile))) {
						$object->protoFile = array();
					}
					$length = Binary::decodeVarint($input, $start);
					$expectedStart = $start + $length;
					if ($expectedStart > $end) {
						throw new ProtobufException('Not enough data.');
					}
					$object->protoFile[] = FileDescriptorProtoMeta::fromProtobuf($input, null, $start, $start + $length);
					if ($start !== $expectedStart) {
						throw new ProtobufException('Unexpected start. Expected ' . $expectedStart . ', got ' . $start . '.', $number);
					}
					break;
				default:
					switch ($wireType) {
						case 0:
							Binary::decodeVarint($input, $start);
							break;
						case 1:
							$start += 8;
							break;
						case 2:
							$start += Binary::decodeVarint($input, $start);
							break;
						case 5:
							$start += 4;
							break;
						default:
							throw new ProtobufException('Unexpected wire type ' . $wireType . '.', $number);
					}
			}
		}

		return $object;
	}
444816
public function slice ($start, $end)
	{
		if (!is_numeric($start)) {
			$start = var_export($start, true);

			throw new \OutOfBoundsException("Invalid start index {$start}");
		}

		if (!is_numeric($end)) {
			$end = var_export($end, true);

			throw new \OutOfBoundsException("Invalid end index {$end}");
		}

		return V(array_slice($this->storage, $start, ($end - $start)));
	}
236719
public function between(DateTime $start, DateTime $end) {
        $this->start($start)
                ->end($end);

        return $this;
    }
1024825
public function slice( $start, $end ) {
		if ( $start < 0 || ! is_int( $start ) ) {
			throw new InvalidArgumentException( 'Start must be a non-negative integer' );
		}

		if ( $end < 0 || ! is_int( $end ) ) {
			throw new InvalidArgumentException( 'End must be a positive integer' );
		}

		if ( $start > $end ) {
			throw new InvalidArgumentException( 'End must be greater than start' );
		}

		if ( $end > $this->count() + 1 ) {
			throw new InvalidArgumentException( 'End must be less than the count of the items in the Collection' );
		}

		$length = $end - $start + 1;

		return $this->new_from_trusted( array_slice( $this->elements, $start, $length ) );
	}
445804
private function isResourceName(\ArrayIterator $iterator): bool
    {
        return !(
            $this->isTTL($iterator) ||
            Classes::isValid(strtoupper($iterator->current())) ||
            RDataTypes::isValid(strtoupper($iterator->current()))
        );
    }
913660
protected function processRequire(Iterator $iterator)
    {
        // sort iterator by name
        $iterator = new SortingIterator($iterator, 'strnatcasecmp');

        // Spin through each of the files within the iterator and if their a valid asset they
        // are added to the array of assets for this directory.
        foreach ($iterator as $file)
        {
            if ( ! $file->isFile()) continue;

            $this->add($file->getPathname());
        }

        return $this;
    }
55030
public function write(Iterator $dataIterator)
    {
        $this->initialize();
        foreach ($dataIterator as $item) {
            $this->writeItem($item);
        }
        $this->finish();
    }
613675
public function getrange($key, $start, $end) {
        return $this->returnCommand(['GETRANGE'], $key, [$key, $start, $end]);
    }
371676
protected function buildRangeObject($start, $end)
    {
        return new TimeRange(
                TimeOfDay::fromNative($start),
                TimeOfDay::fromNative($end)
        );
    }
8019
public static function toKeysArray(ResultIterator $iterator)
    {
        $keys = array();
        foreach ($iterator as $result) {
            $keys[] = $result->getKey();
            
        }
        return $keys;
    }
702759
public function readLinesBetween(int $start, int $end) : array
    {
        $content = file($this->_path);
        $lines   = [];

        for($i = $start; $i < $end; $i++) {
            if(isset($content[$i])) {
                $lines[] = $content[$i];
            }
        }

        return $lines;
    }