@Test public void testEquals() { new EqualsTester() .addEqualityGroup(IrregularTimeSeriesIndex.create(Instant.parse("2015-01-01T00:00:00Z")), IrregularTimeSeriesIndex.create(Instant.parse("2015-01-01T00:00:00Z"))) .addEqualityGroup(IrregularTimeSeriesIndex.create(Instant.parse("2015-01-01T01:00:00Z")), IrregularTimeSeriesIndex.create(Instant.parse("2015-01-01T01:00:00Z"))) .testEquals(); }
@Override public boolean equals(Object obj) { if (obj instanceof IrregularTimeSeriesIndex) { IrregularTimeSeriesIndex otherIndex = (IrregularTimeSeriesIndex) obj; return Arrays.equals(times, otherIndex.times); } return false; }
IrregularTimeSeriesIndex extends AbstractTimeSeriesIndex { @Override public boolean equals(Object obj) { if (obj instanceof IrregularTimeSeriesIndex) { IrregularTimeSeriesIndex otherIndex = (IrregularTimeSeriesIndex) obj; return Arrays.equals(times, otherIndex.times); } return false; } }
IrregularTimeSeriesIndex extends AbstractTimeSeriesIndex { @Override public boolean equals(Object obj) { if (obj instanceof IrregularTimeSeriesIndex) { IrregularTimeSeriesIndex otherIndex = (IrregularTimeSeriesIndex) obj; return Arrays.equals(times, otherIndex.times); } return false; } IrregularTimeSeriesIndex(long[] times); }
IrregularTimeSeriesIndex extends AbstractTimeSeriesIndex { @Override public boolean equals(Object obj) { if (obj instanceof IrregularTimeSeriesIndex) { IrregularTimeSeriesIndex otherIndex = (IrregularTimeSeriesIndex) obj; return Arrays.equals(times, otherIndex.times); } return false; } IrregularTimeSeriesIndex(long[] times); static IrregularTimeSeriesIndex create(Instant... instants); static IrregularTimeSeriesIndex create(List<Instant> instants); static IrregularTimeSeriesIndex parseJson(JsonParser parser); @Override int getPointCount(); @Override long getTimeAt(int point); @Override int hashCode(); @Override boolean equals(Object obj); @Override String getType(); @Override void writeJson(JsonGenerator generator); @Override Iterator<Instant> iterator(); @Override Stream<Instant> stream(); @Override String toString(); }
IrregularTimeSeriesIndex extends AbstractTimeSeriesIndex { @Override public boolean equals(Object obj) { if (obj instanceof IrregularTimeSeriesIndex) { IrregularTimeSeriesIndex otherIndex = (IrregularTimeSeriesIndex) obj; return Arrays.equals(times, otherIndex.times); } return false; } IrregularTimeSeriesIndex(long[] times); static IrregularTimeSeriesIndex create(Instant... instants); static IrregularTimeSeriesIndex create(List<Instant> instants); static IrregularTimeSeriesIndex parseJson(JsonParser parser); @Override int getPointCount(); @Override long getTimeAt(int point); @Override int hashCode(); @Override boolean equals(Object obj); @Override String getType(); @Override void writeJson(JsonGenerator generator); @Override Iterator<Instant> iterator(); @Override Stream<Instant> stream(); @Override String toString(); static final String TYPE; }