/** * <p> * One or more instances. * </p> * * @param instances * One or more instances. * @return Returns a reference to this object so that method calls can be chained together. */ public Reservation withInstances(java.util.Collection<Instance> instances) { setInstances(instances); return this; }
/** * <p> * One or more instances. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setInstances(java.util.Collection)} or {@link #withInstances(java.util.Collection)} if you want to * override the existing values. * </p> * * @param instances * One or more instances. * @return Returns a reference to this object so that method calls can be chained together. */ public Reservation withInstances(Instance... instances) { if (this.instances == null) { setInstances(new com.amazonaws.internal.SdkInternalList<Instance>(instances.length)); } for (Instance ele : instances) { this.instances.add(ele); } return this; }
/** * One or more instances. * <p> * Returns a reference to this object so that method calls can be chained together. * * @param instances One or more instances. * * @return A reference to this updated object so that method calls can be chained * together. */ public Reservation withInstances(Instance... instances) { if (getInstances() == null) setInstances(new java.util.ArrayList<Instance>(instances.length)); for (Instance value : instances) { getInstances().add(value); } return this; }
/** * <p> * One or more instances. * </p> * * @param instances * One or more instances. * @return Returns a reference to this object so that method calls can be chained together. */ public Reservation withInstances(java.util.Collection<Instance> instances) { setInstances(instances); return this; }
/** * <p> * One or more instances. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setInstances(java.util.Collection)} or {@link #withInstances(java.util.Collection)} if you want to * override the existing values. * </p> * * @param instances * One or more instances. * @return Returns a reference to this object so that method calls can be chained together. */ public Reservation withInstances(Instance... instances) { if (this.instances == null) { setInstances(new com.amazonaws.internal.SdkInternalList<Instance>(instances.length)); } for (Instance ele : instances) { this.instances.add(ele); } return this; }