---
title: "only(_:)"
framework: groupactivities
role: symbol
role_heading: Type Method
path: "groupactivities/participants/only(_:)-swift.type.method"
---

# only(_:)

Returns a set containing the specified participant.

## Declaration

```swift
static func only(_ participant: Participant) -> Participants
```

## Parameters

- `participant`: The participant to add to the set.

## See Also

### Getting the set of participants

- [Participants.all](groupactivities/participants/all.md)
- [Participants.only(_:)](groupactivities/participants/only(_:)-swift.enum.case.md)
