@SuppressWarnings("unchecked")
        private T computeNext() {
            // Filter out shapes of other types.
            while (iterator.hasNext()) {
                Shape nextCandidate = iterator.next();
                if (shapeType == nextCandidate.getClass()) {
                    return (T) nextCandidate;
                }
            }
            return null;
        }
Provides a view of a set returned by the getXwithTrait methods so that only
shapes of a specific type are treated as present within the set.

@param <T> Type of shape to project out of the Set.
smithy-model/src/main/java/software/amazon/smithy/model/ShapeTypeFilteredSet.java