@Override public boolean equals(Object other) { if (other == this) { return true; } if ((other instanceof ExternalDependencies) == false) { return false; } ExternalDependencies rhs = ((ExternalDependencies) other); return (((this.aJodaTimeObject == rhs.aJodaTimeObject)||((this.aJodaTimeObject!= null)&&this.aJodaTimeObject.equals(rhs.aJodaTimeObject)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DataSourceMetadataResultValue that = (DataSourceMetadataResultValue) o; if (maxIngestedEventTime != null ? !maxIngestedEventTime.equals(that.maxIngestedEventTime) : that.maxIngestedEventTime != null) { return false; } return true; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TimestampValue that = (TimestampValue) o; return value.equals(that.value); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Bucket bucket = (Bucket) o; if (partitionNum != bucket.partitionNum) { return false; } if (shardNum != bucket.shardNum) { return false; } if (time != null ? !time.equals(bucket.time) : bucket.time != null) { return false; } return true; }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } MapBasedRow that = (MapBasedRow) o; if (!event.equals(that.event)) { return false; } if (!timestamp.equals(that.timestamp)) { return false; } return true; }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } TimestampSpec that = (TimestampSpec) o; if (!timestampColumn.equals(that.timestampColumn)) { return false; } if (!timestampFormat.equals(that.timestampFormat)) { return false; } return !(missingValue != null ? !missingValue.equals(that.missingValue) : that.missingValue != null); }
@Override public boolean equals(Object o) { if (o == this) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final SupervisorReport that = (SupervisorReport) o; if (!id.equals(that.id)) { return false; } if (!generationTime.equals(that.generationTime)) { return false; } return payload.equals(that.payload); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Timestamp timestamp = (Timestamp) o; if (rest != timestamp.rest) return false; if (!date.equals(timestamp.date)) return false; return true; }
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final TimedPhase phase1 = (TimedPhase) o; if (phase != null ? !phase.equals(phase1.phase) : phase1.phase != null) { return false; } if (startPhase != null ? !startPhase.equals(phase1.startPhase) : phase1.startPhase != null) { return false; } return true; }
@Override public int compareTo(FileSystemDatasetVersion other) { TimestampedDatasetVersion otherAsDateTime = (TimestampedDatasetVersion) other; return this.version.equals(otherAsDateTime.version) ? 0 : this.version.compareTo(otherAsDateTime.version); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } AuditEntry entry = (AuditEntry) o; if (!auditTime.equals(entry.auditTime)) { return false; } if (!auditInfo.equals(entry.auditInfo)) { return false; } if (!key.equals(entry.key)) { return false; } if (!payload.equals(entry.payload)) { return false; } if (!type.equals(entry.type)) { return false; } return true; }
public static boolean isEmpty(Interval interval) { return interval.getStart().equals(interval.getEnd()); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ImmutableWorkerInfo that = (ImmutableWorkerInfo) o; if (currCapacityUsed != that.currCapacityUsed) { return false; } if (!worker.equals(that.worker)) { return false; } if (!availabilityGroups.equals(that.availabilityGroups)) { return false; } if (!runningTasks.equals(that.runningTasks)) { return false; } if (!lastCompletedTaskTime.equals(that.lastCompletedTaskTime)) { return false; } return !(blacklistedUntil != null ? !blacklistedUntil.equals(that.blacklistedUntil) : that.blacklistedUntil != null); }
@Override public int compareTo(FileSystemDatasetVersion other) { TimestampedDatasetVersion otherAsDateTime = (TimestampedDatasetVersion) other; return this.version.equals(otherAsDateTime.version) ? this.path.compareTo(otherAsDateTime.path) : this.version.compareTo(otherAsDateTime.version); }
@Override public boolean apply(@Nullable Pair<DruidServerMetadata, DataSegment> input) { return input.rhs.getInterval().getStart().equals(SEGMENT_INTERVAL_START.plusDays(INITIAL_SEGMENTS + 2)); } }
/** * Removes {@code smallInterval} from {@code largeInterval}. The end of both intervals should be same. * * @return an interval of {@code largeInterval} - {@code smallInterval}. */ static Interval removeIntervalFromEnd(Interval largeInterval, Interval smallInterval) { Preconditions.checkArgument( largeInterval.getEnd().equals(smallInterval.getEnd()), "end should be same. largeInterval[%s] smallInterval[%s]", largeInterval, smallInterval ); return new Interval(largeInterval.getStart(), smallInterval.getStart()); }
if (!remainingStart.equals(remainingEnd)) { filteredIntervals.add(new Interval(remainingStart, remainingEnd));
@Test public void shouldGiveTimeoutTime() throws Exception { DateTime expected = new DateTime().plusMillis((int) Timeout.NINETY_SECONDS.inMillis()); DateTime actual = new SystemTimeClock().timeoutTime(Timeout.NINETY_SECONDS); assertThat(actual.equals(expected) || actual.isAfter(expected),is(true)); } }
DateTime anotherCreatedTime = provisioner.getStats().toList().get(0).getTimestamp(); Assert.assertTrue( createdTime.equals(anotherCreatedTime) );
@Test public void testMergeResults() { List<Result<TimeBoundaryResultValue>> results = Arrays.asList( new Result<>( DateTimes.nowUtc(), new TimeBoundaryResultValue( ImmutableMap.of( "maxTime", "2012-01-01", "minTime", "2011-01-01" ) ) ), new Result<>( DateTimes.nowUtc(), new TimeBoundaryResultValue( ImmutableMap.of( "maxTime", "2012-02-01", "minTime", "2011-01-01" ) ) ) ); TimeBoundaryQuery query = new TimeBoundaryQuery(new TableDataSource("test"), null, null, null, null); Iterable<Result<TimeBoundaryResultValue>> actual = query.mergeResults(results); Assert.assertTrue(actual.iterator().next().getValue().getMaxTime().equals(DateTimes.of("2012-02-01"))); }