public SearchTransitGatewayMulticastGroupsResult withMulticastGroups(TransitGatewayMulticastGroup... multicastGroups) {
        if (this.multicastGroups == null) {
            setMulticastGroups(new com.amazonaws.internal.SdkInternalList<TransitGatewayMulticastGroup>(multicastGroups.length));
        }
        for (TransitGatewayMulticastGroup ele : multicastGroups) {
            this.multicastGroups.add(ele);
        }
        return this;
    }
<p>
Information about the transit gateway multicast group.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setMulticastGroups(java.util.Collection)} or {@link #withMulticastGroups(java.util.Collection)} if you
want to override the existing values.
</p>

@param multicastGroups
       Information about the transit gateway multicast group.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/SearchTransitGatewayMulticastGroupsResult.java