{@inheritdoc}
@throws OutOfRangeException
338564
final public function offsetGet($offset)
    {
        if (!isset($this->props['items'][$offset])) {
            throw new OutOfRangeException('Trace['.$offset.'] is not found');
        }
        return $this->props['items'][$offset];
    }
280901
public function take($idx)
    {
        self::mustBeInteger($idx, 'Index');

        if ($idx instanceof N) {
            $idx = $idx->int;
        }

        if (!$this->exist($idx)) {
            throw new \OutOfRangeException(
                'Given '. $idx .' index does not exist!'
            );
        }

        return $this->value[$idx];
    }
588473
private function getComponent(string $id)
    {
        if (!isset($this->storage[$id])) {
            throw new \OutOfRangeException(sprintf('Component with ID "%s" not found.', $id));
        }
        if (\is_array($this->storage[$id])) {
            $component = $this->factory->build($this->getComponentConfig($id));
            $this->resolveComponentDependencies($id, $component);
            $this->storage[$id] = $component;
        }
        return $this->storage[$id];
    }
191827
public function getChild($index)
    {
        $children = $this->getChildren();
        
        if(!isset($children[$index]))
        {
            throw new OutOfBoundsException(sprintf('Child "%s" dosn\'t exist.', $index));
        }

        return $children[$index];
    }
1106318
public function page( $page, $size = null ) {
        if( is_null( $size )) {
            $size = $this->maxPageSize();
        }

        if( $size > $this->maxPageSize() || $size <= 0 ) {
            throw new OutOfRangeException('$size has to be between 0 and ' . $this->maxPageSize() . ', was ' . $size );
        }

        if( $page < 0 ) {
            throw new OutOfRangeException('$page has to be 0 or greater');
        }

        return $this->request( $this->createPaginatedRequestQuery( $page, $size ) )->json();
    }
1302175
public function remove($offset, $length = 1)
    {
        if (!isset($this->elements[$offset])) {
            throw new OutOfBoundsException(sprintf('The offset %s is not within the property path', $offset));
        }

        $this->resize($offset, $length, 0);
    }
1332998
public function getNext()
	{
		if (! $this->valid()) {
			throw new \OutOfBoundsException('End of iterator reached.');
		}

		$value = $this->get($this->key());

		$this->next();

		return $value;
	}
83467
public function offsetSet($offset, $value): void
    {
        if (null === $offset) {
            $this->resolver->value(function ($value): void {
                $this->items->add($value);
            }, $value);

            return;
        }

        throw new \OutOfBoundsException();
    }
790311
public function slice($index, $count = null){
		
		if(!$this->offsetExists($index)){
			throw new \OutOfRangeException('$index is invalid');
		}
		
		$arr = \array_slice($this->_Arr, $index, $count);
		return new static($arr);
		
	}
163993
public function popField()
    {
        if ($this->getCount() > 0) {
            $fields = $this->removeFieldAtIndex($this->getCount() - 1);
            return $fields[0];
        }

        throw new \OutOfRangeException("Can't call popField when the field count is 0");
    }
1052213
public function skip(int $position): Pair
    {
        if ($position < 0 || $position >= count($this->pairs)) {
            throw new OutOfRangeException();
        }

        return $this->pairs[$position]->copy();
    }
1223371
public function getColumn( $column )
	{
		if( $column < 0 || $column >= $this->getColumnNumber() )
			throw new OutOfRangeException( 'Column key "'.$column.'" is not valid.' );
		$values = array();
		for( $row = 0; $row < $this->getRowNumber(); $row++ )
			$values[] = $this->getValue( $row, $column );
		return new Alg_Math_Algebra_Vector( $values );
	}
775041
public function offsetGet($offset)
    {
        if (null === ($token = $this->getToken($offset))) {
            throw OutOfRangeException::create(
                'No value is set at offset %d.',
                $offset
            );
        }

        return $token;
    }
640351
public function getInteger($key)
	{
		$resolved = false;
		$value = $this->getByKey($key, $this->data, $resolved);
		
		if($resolved)
		{
			return (int)$value;
		}
		
		if(func_num_args() > 1)
		{
			return func_get_arg(1);
		}
		
		throw new \OutOfBoundsException('Configuration setting not found: "' . $key . '"');
	}
866984
public function onError( ResponseInterface $response, RequestInterface $request ) {
        $json = $this->getResponseAsJson( $response );
        if( !is_null( $json ) && isset( $json->text )) {
            if( strpos( $json->text, 'page out of range.' ) === 0 ) {
                throw new PageOutOfRangeException( $json->text, $response );
            }
        }
    }
948457
public function offsetGet($offset)
    {
        $this->invoke();
        if (! isset($this->result->body[$offset])) {
            throw new OutOfBoundsException("[${offset}] for object[" . get_class($this->result) . ']', 400);
        }

        return $this->result->body[$offset];
    }
32932
@Override
  public MappeableContainer not(final int firstOfRange, final int lastOfRange) {
    // TODO: may need to convert to a RunContainer
    // TODO: this can be optimized for performance
    if (firstOfRange >= lastOfRange) {
      return clone(); // empty range
    }

    // determine the span of array indices to be affected
    int startIndex = BufferUtil.unsignedBinarySearch(content, 0, cardinality, (short) firstOfRange);
    if (startIndex < 0) {
      startIndex = -startIndex - 1;
    }
    int lastIndex =
        BufferUtil.unsignedBinarySearch(content, 0, cardinality, (short) (lastOfRange - 1));
    if (lastIndex < 0) {
      lastIndex = -lastIndex - 2;
    }
    final int currentValuesInRange = lastIndex - startIndex + 1;
    final int spanToBeFlipped = lastOfRange - firstOfRange;
    final int newValuesInRange = spanToBeFlipped - currentValuesInRange;
    final int cardinalityChange = newValuesInRange - currentValuesInRange;
    final int newCardinality = cardinality + cardinalityChange;

    if (newCardinality > DEFAULT_MAX_SIZE) {
      return toBitmapContainer().not(firstOfRange, lastOfRange);
    }

    final MappeableArrayContainer answer = new MappeableArrayContainer(newCardinality);
    if (!BufferUtil.isBackedBySimpleArray(answer.content)) {
      throw new RuntimeException("Should not happen. Internal bug.");
    }
    short[] sarray = answer.content.array();

    for (int i = 0; i < startIndex; ++i) {
      // copy stuff before the active area
      sarray[i] = content.get(i);
    }

    int outPos = startIndex;
    int inPos = startIndex; // item at inPos always >= valInRange

    int valInRange = firstOfRange;
    for (; valInRange < lastOfRange && inPos <= lastIndex; ++valInRange) {
      if ((short) valInRange != content.get(inPos)) {
        sarray[outPos++] = (short) valInRange;
      } else {
        ++inPos;
      }
    }

    for (; valInRange < lastOfRange; ++valInRange) {
      answer.content.put(outPos++, (short) valInRange);
    }

    // content after the active range
    for (int i = lastIndex + 1; i < cardinality; ++i) {
      answer.content.put(outPos++, content.get(i));
    }
    answer.cardinality = newCardinality;
    return answer;
  }