# CollectElements(HashSet<GraphElement>, Func<GraphElement, bool>)

> Retrieves the set of edges that match a specified condition. The tested edges are connected to this node.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Experimental.GraphView](/engine/6000.7/script-reference/unityeditor/experimental/graphview.md)
* **Assembly:** UnityEditor

```csharp
public virtual void CollectElements(HashSet<GraphElement> collectedElementSet, Func<GraphElement, bool> conditionFunc)
```

### Parameters

**** (\[HashSet\<GraphElement>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.hashset-1)): The set of matching edges.**** (\[Func\<GraphElement, bool>]\(https\://learn.microsoft.com/dotnet/api/system.func-1)): A function that determines whether an edge is added to the set of matching edges.
