@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getMetricName() == null) ? 0 : getMetricName().hashCode()); hashCode = prime * hashCode + ((getNamespace() == null) ? 0 : getNamespace().hashCode()); hashCode = prime * hashCode + ((getDimensions() == null) ? 0 : getDimensions().hashCode()); hashCode = prime * hashCode + ((getStatistic() == null) ? 0 : getStatistic().hashCode()); hashCode = prime * hashCode + ((getUnit() == null) ? 0 : getUnit().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 (getMetricName() != null) sb.append("MetricName: ").append(getMetricName()).append(","); if (getNamespace() != null) sb.append("Namespace: ").append(getNamespace()).append(","); if (getDimensions() != null) sb.append("Dimensions: ").append(getDimensions()).append(","); if (getStatistic() != null) sb.append("Statistic: ").append(getStatistic()).append(","); if (getUnit() != null) sb.append("Unit: ").append(getUnit()); sb.append("}"); return sb.toString(); }
if (other.getNamespace() != null && other.getNamespace().equals(this.getNamespace()) == false) return false; if (other.getDimensions() == null ^ this.getDimensions() == null) return false; if (other.getDimensions() != null && other.getDimensions().equals(this.getDimensions()) == false) return false; if (other.getStatistic() == null ^ this.getStatistic() == null)
/** * <p> * The dimensions of the metric. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param dimensions <p> * The dimensions of the metric. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public CustomizedMetricSpecification withDimensions(MetricDimension... dimensions) { if (getDimensions() == null) { this.dimensions = new java.util.ArrayList<MetricDimension>(dimensions.length); } for (MetricDimension value : dimensions) { this.dimensions.add(value); } return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getMetricName() == null) ? 0 : getMetricName().hashCode()); hashCode = prime * hashCode + ((getNamespace() == null) ? 0 : getNamespace().hashCode()); hashCode = prime * hashCode + ((getDimensions() == null) ? 0 : getDimensions().hashCode()); hashCode = prime * hashCode + ((getStatistic() == null) ? 0 : getStatistic().hashCode()); hashCode = prime * hashCode + ((getUnit() == null) ? 0 : getUnit().hashCode()); return hashCode; }
/** * 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 (getMetricName() != null) sb.append("MetricName: " + getMetricName() + ","); if (getNamespace() != null) sb.append("Namespace: " + getNamespace() + ","); if (getDimensions() != null) sb.append("Dimensions: " + getDimensions() + ","); if (getStatistic() != null) sb.append("Statistic: " + getStatistic() + ","); if (getUnit() != null) sb.append("Unit: " + getUnit()); sb.append("}"); return sb.toString(); }
if (!customizedMetricSpecification.getDimensions().isEmpty() || !((com.amazonaws.internal.SdkInternalList<MetricDimension>) customizedMetricSpecification.getDimensions()).isAutoConstruct()) { com.amazonaws.internal.SdkInternalList<MetricDimension> dimensionsList = (com.amazonaws.internal.SdkInternalList<MetricDimension>) customizedMetricSpecification .getDimensions(); int dimensionsListIndex = 1;
&& other.getNamespace().equals(this.getNamespace()) == false) return false; if (other.getDimensions() == null ^ this.getDimensions() == null) return false; if (other.getDimensions() != null && other.getDimensions().equals(this.getDimensions()) == false) return false; if (other.getStatistic() == null ^ this.getStatistic() == null)
request.addParameter(prefix, StringUtils.fromString(namespace)); if (_customizedMetricSpecification.getDimensions() != null) { prefix = _prefix + "Dimensions"; java.util.List<MetricDimension> dimensions = _customizedMetricSpecification .getDimensions(); int dimensionsIndex = 1; String dimensionsPrefix = prefix;