Please solve the programming task below using a self-contained code snippet in a markdown code block.

You are given an integer array nums. The unique elements of an array are the elements that appear exactly once in the array.
Return the sum of all the unique elements of nums.
 
Please complete the following python code precisely:
```python
class Solution:
    def sumOfUnique(self, nums: List[int]) -> int:
```