@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getOnDemandAllocationStrategy() == null) ? 0 : getOnDemandAllocationStrategy().hashCode()); hashCode = prime * hashCode + ((getOnDemandBaseCapacity() == null) ? 0 : getOnDemandBaseCapacity().hashCode()); hashCode = prime * hashCode + ((getOnDemandPercentageAboveBaseCapacity() == null) ? 0 : getOnDemandPercentageAboveBaseCapacity().hashCode()); hashCode = prime * hashCode + ((getSpotAllocationStrategy() == null) ? 0 : getSpotAllocationStrategy().hashCode()); hashCode = prime * hashCode + ((getSpotInstancePools() == null) ? 0 : getSpotInstancePools().hashCode()); hashCode = prime * hashCode + ((getSpotMaxPrice() == null) ? 0 : getSpotMaxPrice().hashCode()); return hashCode; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getOnDemandAllocationStrategy() != null) sb.append("OnDemandAllocationStrategy: ").append(getOnDemandAllocationStrategy()).append(","); if (getOnDemandBaseCapacity() != null) sb.append("OnDemandBaseCapacity: ").append(getOnDemandBaseCapacity()).append(","); if (getOnDemandPercentageAboveBaseCapacity() != null) sb.append("OnDemandPercentageAboveBaseCapacity: ").append(getOnDemandPercentageAboveBaseCapacity()).append(","); if (getSpotAllocationStrategy() != null) sb.append("SpotAllocationStrategy: ").append(getSpotAllocationStrategy()).append(","); if (getSpotInstancePools() != null) sb.append("SpotInstancePools: ").append(getSpotInstancePools()).append(","); if (getSpotMaxPrice() != null) sb.append("SpotMaxPrice: ").append(getSpotMaxPrice()); sb.append("}"); return sb.toString(); }
if (other.getSpotAllocationStrategy() != null && other.getSpotAllocationStrategy().equals(this.getSpotAllocationStrategy()) == false) return false; if (other.getSpotInstancePools() == null ^ this.getSpotInstancePools() == null) return false; if (other.getSpotInstancePools() != null && other.getSpotInstancePools().equals(this.getSpotInstancePools()) == false) return false; if (other.getSpotMaxPrice() == null ^ this.getSpotMaxPrice() == null)
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getOnDemandAllocationStrategy() != null) sb.append("OnDemandAllocationStrategy: " + getOnDemandAllocationStrategy() + ","); if (getOnDemandBaseCapacity() != null) sb.append("OnDemandBaseCapacity: " + getOnDemandBaseCapacity() + ","); if (getOnDemandPercentageAboveBaseCapacity() != null) sb.append("OnDemandPercentageAboveBaseCapacity: " + getOnDemandPercentageAboveBaseCapacity() + ","); if (getSpotAllocationStrategy() != null) sb.append("SpotAllocationStrategy: " + getSpotAllocationStrategy() + ","); if (getSpotInstancePools() != null) sb.append("SpotInstancePools: " + getSpotInstancePools() + ","); if (getSpotMaxPrice() != null) sb.append("SpotMaxPrice: " + getSpotMaxPrice()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getOnDemandAllocationStrategy() == null) ? 0 : getOnDemandAllocationStrategy() .hashCode()); hashCode = prime * hashCode + ((getOnDemandBaseCapacity() == null) ? 0 : getOnDemandBaseCapacity().hashCode()); hashCode = prime * hashCode + ((getOnDemandPercentageAboveBaseCapacity() == null) ? 0 : getOnDemandPercentageAboveBaseCapacity().hashCode()); hashCode = prime * hashCode + ((getSpotAllocationStrategy() == null) ? 0 : getSpotAllocationStrategy() .hashCode()); hashCode = prime * hashCode + ((getSpotInstancePools() == null) ? 0 : getSpotInstancePools().hashCode()); hashCode = prime * hashCode + ((getSpotMaxPrice() == null) ? 0 : getSpotMaxPrice().hashCode()); return hashCode; }
if (instancesDistribution.getSpotInstancePools() != null) { request.addParameter("MixedInstancesPolicy.InstancesDistribution.SpotInstancePools", StringUtils.fromInteger(instancesDistribution.getSpotInstancePools()));
if (instancesDistribution.getSpotInstancePools() != null) { request.addParameter("MixedInstancesPolicy.InstancesDistribution.SpotInstancePools", StringUtils.fromInteger(instancesDistribution.getSpotInstancePools()));
&& other.getSpotAllocationStrategy().equals(this.getSpotAllocationStrategy()) == false) return false; if (other.getSpotInstancePools() == null ^ this.getSpotInstancePools() == null) return false; if (other.getSpotInstancePools() != null && other.getSpotInstancePools().equals(this.getSpotInstancePools()) == false) return false; if (other.getSpotMaxPrice() == null ^ this.getSpotMaxPrice() == null)
request.addParameter(prefix, StringUtils.fromString(spotAllocationStrategy)); if (_instancesDistribution.getSpotInstancePools() != null) { prefix = _prefix + "SpotInstancePools"; Integer spotInstancePools = _instancesDistribution.getSpotInstancePools(); request.addParameter(prefix, StringUtils.fromInteger(spotInstancePools));