{@inheritdoc}

@param string|array $chain
@return self (same instance)
976547
public function setChain($chain)
    {
        $this->chain = is_string($chain) ? explode('|', $chain) : $chain;
        return $this;
    }
293694
@SafeVarargs
    public static <T> Callback<T> chain(Callback<T>... callbacks)
    {
        return chain(Arrays.asList(callbacks));
    }
217132
public static function requeue(int $deliveryTag): self
    {
        $self = new self($deliveryTag);
        $self->requeue = true;

        return $self;
    }
32438
function(chains) {
    var vertArrays = this.vertArrays();
    var selectedArrays = [];
    var set = {};
    for (var ci = 0; ci < chains.length; ++ci) {
      set[chains[ci]] = true;
    }
    for (var i = 0; i < vertArrays.length; ++i) {
      if (set[vertArrays[i].chain()] === true) {
        selectedArrays.push(vertArrays[i]);
      }
    }
    return selectedArrays;
  }
398142
public function tags($tags): self
    {
        $tags = (array) $tags;

        $tags = array_merge($this->tags, $tags);

        $this->tags = array_unique($tags);

        return $this;
    }
743032
private function makePreResponseActions($chain): \Closure
    {
        $tasks = $chain->get('beforeReaction') ?? [];
        $tasks = $this->convertToClosures($tasks);
        $beforeReaction = function () use ($tasks) {
            foreach ($tasks as $task) {
                $task();
            }
        };

        return $beforeReaction;
    }
1037799
protected function parseChain($chain)
    {
        $parts = is_array($chain) ? $chain : explode('|', $chain);
        $parsed = [];

        foreach ($parts as $name) {
            list($operator, $key) = $this->splitExpression($name);

            $dotPos = strpos($key, ':');

            list($key, $parameters) = $dotPos ? explode(':', $key, 2) : [$key, ''];

            $parsed[$key] = [
                'operator'   => $operator,
                'parameters' => $parameters ? explode(',', $parameters) : [],
            ];
        }

        return $parsed;
    }
1005390
@Override
    public ChainLink[] onSuccess() {
        ChainLink[] chain = new ChainLink[onSuccessChains.size()];
        return onSuccessChains.toArray(chain);
    }
1110628
public function update($value)
        {
            $this->validate($value);
            if ($this->chaining) {
                $this->chain = $value;
            } else {
                $this->current = $value;
            }
            return $this;
        }
763469
public function prepend(FilterChain $chain)
    {
        $priorities = array_keys($this->filters);
        if (count($priorities)) {
            $priority = min(array_keys($this->filters)) - 1;
        } else {
            $priority = 0;
        }
        $filters = $chain->getFilters();
        foreach ($filters as $filter) {
            $this->add($filter, $priority);
        }
        return $this;
    }
1371507
public function withBody($body): self {
        $clone = clone $this;

        if ($body === null) {
            $clone->body = new StringBody("");
        } elseif (\is_scalar($body)) {
            $clone->body = new StringBody((string) $body);
        } elseif ($body instanceof RequestBody) {
            $clone->body = $body;
        } else {
            throw new \TypeError("Invalid body type: " . gettype($body));
        }

        return $clone;
    }
116326
final public function chain(PipeChainInterface $chain): PipeChainInterface
    {
        if ( $this->next instanceof PipeChainInterface ) {
            $this->next->chain($chain);
        }
        else {
            $this->next = $chain;
        }

        return $this;
    }
337980
public function execute(KCommandInterface $command, KCommandChainInterface $chain)
    {
        $parts  = explode('.', $command->getName());
        $method = '_'.$parts[0].ucfirst($parts[1]);

        if(method_exists($this, $method)) {
            return $this->$method($command);
        }
    }
623924
function(required, cb) {
      var chain = new Chain(config);
      chain.on(required, cb);
      return chain;
    }
1015849
public function flush($tag) {
        $args = func_get_args();
        foreach ($args as $item) {
            if (in_array($item, $this->sequence)) {
                $this->$item = [];
            }
        }
        return $this;
    }
1097497
public function middleware(...$middleware): self
    {
        foreach ($middleware as $handler) {
            $this->chains[] = $handler;
        }

        return $this;
    }
1116428
function Chain(val, name) {
    if (!(this instanceof Chain)) return new Chain(val, name);

	this._val = val;
	this._name = name;

	this.clear();

	return this;

}