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

You are given an array nums consisting of positive integers.
We call a subarray of nums nice if the bitwise AND of every pair of elements that are in different positions in the subarray is equal to 0.
Return the length of the longest nice subarray.
A subarray is a contiguous part of an array.
Note that subarrays of length 1 are always considered nice.
 
Please complete the following python code precisely:
```python
class Solution:
    def longestNiceSubarray(self, nums: List[int]) -> int:
```