public CloudFormationCollectionFilter withStackNames(String... stackNames) {
        if (this.stackNames == null) {
            setStackNames(new java.util.ArrayList<String>(stackNames.length));
        }
        for (String ele : stackNames) {
            this.stackNames.add(ele);
        }
        return this;
    }
<p>
An array of CloudFormation stack names.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setStackNames(java.util.Collection)} or {@link #withStackNames(java.util.Collection)} if you want to
override the existing values.
</p>

@param stackNames
       An array of CloudFormation stack names.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-devopsguru/src/main/java/com/amazonaws/services/devopsguru/model/CloudFormationCollectionFilter.java