@Test public void testEquals() { assertThat(new SensorMetrics()).isEqualTo(new SensorMetrics()); assertThat(createAttributedMetrics()).isEqualTo(createAttributedMetrics()); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SensorMetrics that = (SensorMetrics) o; return isAttributionEnabled == that.isAttributionEnabled && total.equals(that.total) && Utilities.sparseArrayEquals(sensorConsumption, that.sensorConsumption); }
SensorMetrics extends SystemMetrics<SensorMetrics> { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SensorMetrics that = (SensorMetrics) o; return isAttributionEnabled == that.isAttributionEnabled && total.equals(that.total) && Utilities.sparseArrayEquals(sensorConsumption, that.sensorConsumption); } }
SensorMetrics extends SystemMetrics<SensorMetrics> { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SensorMetrics that = (SensorMetrics) o; return isAttributionEnabled == that.isAttributionEnabled && total.equals(that.total) && Utilities.sparseArrayEquals(sensorConsumption, that.sensorConsumption); } SensorMetrics();  SensorMetrics(boolean isAttributionEnabled); }
SensorMetrics extends SystemMetrics<SensorMetrics> { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SensorMetrics that = (SensorMetrics) o; return isAttributionEnabled == that.isAttributionEnabled && total.equals(that.total) && Utilities.sparseArrayEquals(sensorConsumption, that.sensorConsumption); } SensorMetrics();  SensorMetrics(boolean isAttributionEnabled); @Override SensorMetrics sum(@Nullable SensorMetrics b, @Nullable SensorMetrics output); @Override SensorMetrics diff(@Nullable SensorMetrics b, @Nullable SensorMetrics output); @Override SensorMetrics set(SensorMetrics b); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Nullable JSONObject attributionToJSONObject(); }
SensorMetrics extends SystemMetrics<SensorMetrics> { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SensorMetrics that = (SensorMetrics) o; return isAttributionEnabled == that.isAttributionEnabled && total.equals(that.total) && Utilities.sparseArrayEquals(sensorConsumption, that.sensorConsumption); } SensorMetrics();  SensorMetrics(boolean isAttributionEnabled); @Override SensorMetrics sum(@Nullable SensorMetrics b, @Nullable SensorMetrics output); @Override SensorMetrics diff(@Nullable SensorMetrics b, @Nullable SensorMetrics output); @Override SensorMetrics set(SensorMetrics b); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Nullable JSONObject attributionToJSONObject(); public boolean isAttributionEnabled; final Consumption total; final SparseArray<Consumption> sensorConsumption; }