public GetAnomaliesResult withAnomalies(Anomaly... anomalies) {
        if (this.anomalies == null) {
            setAnomalies(new java.util.ArrayList<Anomaly>(anomalies.length));
        }
        for (Anomaly ele : anomalies) {
            this.anomalies.add(ele);
        }
        return this;
    }
<p>
A list of cost anomalies.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setAnomalies(java.util.Collection)} or {@link #withAnomalies(java.util.Collection)} if you want to
override the existing values.
</p>

@param anomalies
       A list of cost anomalies.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-costexplorer/src/main/java/com/amazonaws/services/costexplorer/model/GetAnomaliesResult.java