public void setSubnets(java.util.Collection<SubnetAssociation> subnets) {
        if (subnets == null) {
            this.subnets = null;
            return;
        }

        this.subnets = new com.amazonaws.internal.SdkInternalList<SubnetAssociation>(subnets);
    }
<p>
The subnets associated with the multicast domain.
</p>

@param subnets
       The subnets associated with the multicast domain.
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/TransitGatewayMulticastDomainAssociations.java