public function filter(\Closure $closure)
    {
        $newInstance = new self();
        $newInstance->setArray(array_filter($this->array, $closure));
        return $newInstance;
    }
public function filter(\Closure $closure)
    {
        $newInstance = new self();
        $newInstance->setArray(array_filter($this->array, $closure));
        return $newInstance;
    }
public function filter ( \ Closure $ closure ) { $ newInstance = new self ( ) ; $ newInstance -> setArray ( array_filter ( $ this -> array , $ closure ) ) ; return $ newInstance ; }
returns a clone of this ArrayList, filtered by the given closure function
@param \Closure $closure
@return ArrayListInterface|ArrayListTrait
returns a clone of this ArrayList filtered by the given closure function