boolean hasFeature(TraitFeature[] haystack) {
            for (TraitFeature test : haystack) {
                if (test == this) {
                    return true;
                }
            }
            return false;
        }
Checks if the current enum value is present in an array of enum values.

@param haystack Array of enums to check.
@return Returns true if this enum is found in the array.
smithy-model/src/main/java/software/amazon/smithy/model/shapes/SmithyIdlModelSerializer.java