public UserGroup withReplicationGroups(String... replicationGroups) {
        if (this.replicationGroups == null) {
            setReplicationGroups(new com.amazonaws.internal.SdkInternalList<String>(replicationGroups.length));
        }
        for (String ele : replicationGroups) {
            this.replicationGroups.add(ele);
        }
        return this;
    }
<p>
A list of replication groups that the user group can access.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setReplicationGroups(java.util.Collection)} or {@link #withReplicationGroups(java.util.Collection)} if
you want to override the existing values.
</p>

@param replicationGroups
       A list of replication groups that the user group can access.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-elasticache/src/main/java/com/amazonaws/services/elasticache/model/UserGroup.java