@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GcDateStamp that = (GcDateStamp) o; return time != null ? time.equals(that.time) : that.time == null; }
@Override public ConnectorPageSource createPageSource( ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorSplit split, List<ColumnHandle> columns) { AtopSplit atopSplit = (AtopSplit) split; ImmutableList.Builder<Type> types = ImmutableList.builder(); ImmutableList.Builder<AtopColumn> atopColumns = ImmutableList.builder(); for (ColumnHandle column : columns) { AtopColumnHandle atopColumnHandle = (AtopColumnHandle) column; AtopColumn atopColumn = atopSplit.getTable().getColumn(atopColumnHandle.getName()); atopColumns.add(atopColumn); types.add(typeManager.getType(atopColumn.getType())); } ZonedDateTime date = atopSplit.getDate(); checkArgument(date.equals(date.withHour(0).withMinute(0).withSecond(0).withNano(0)), "Expected date to be at beginning of day"); return new AtopPageSource(readerPermits, atopFactory, session, utf8Slice(atopSplit.getHost().getHostText()), atopSplit.getTable(), date, atopColumns.build(), types.build()); } }
private boolean areDatesEqual(ZonedDateTime that) { if (dateTime == null && that == null) { return true; } if (dateTime != null && that != null) { return dateTime.equals(that); } return false; }
private boolean areDatesEqual(ZonedDateTime that) { if (dateTime == null && that == null) { return true; } if (dateTime != null && that != null) { return dateTime.equals(that); } return false; }
ZoneId zid = ZoneId.of("America/New_York"); ZoneOffset offset = ZoneOffset.from(LocalDateTime.now().atZone(zid)); ZonedDateTime zdt0 = ZonedDateTime.of(2014, 8, 24, 21, 10, 1, 777000002, offset); ZonedDateTime zdt1 = ZonedDateTime.of(2014, 8, 24, 21, 10, 1, 777000002, zid); System.out.println("isEqual:" + zdt0.isEqual(zdt1)); System.out.println("equals: " + zdt0.equals(zdt1));
public StateRecord setExpiresAt(@NonNull ZonedDateTime expiresAt) { if( !this.expiresAt.equals(expiresAt) ) { this.expiresAt = expiresAt; dirty = true; } return this; }
private ScheduledFuture<?> submitToExecutor(CronRunnable cronRunnable, boolean inclusive) { ZonedDateTime now = ZonedDateTime.now(); ZonedDateTime next = cronRunnable.pattern.next(now, inclusive); long delta; if (now.equals(next)) { delta = 0; } else { Duration difference = Duration.between(now, next); delta = difference.toNanos(); } return executor.schedule(cronRunnable, delta, TimeUnit.NANOSECONDS); }
@Override public boolean equals(Object other) { return other instanceof RepeaterWeekend && ((Repeater) other).getType().equals(getType()) && ((Repeater) other).getNow().equals(getNow()); }
@Override public boolean equals(Object other) { return other instanceof RepeaterMonthName && ((Repeater) other).getType().equals(getType()) && ((Repeater) other).getNow().equals(getNow()); }
@Override public boolean equals(Object other) { return other instanceof RepeaterDayName && ((Repeater) other).getType().equals(getType()) && ((Repeater) other).getNow().equals(getNow()); }
@Override public boolean equals(Object other) { return other instanceof RepeaterMonth && ((Repeater) other).getType().equals(getType()) && ((Repeater) other).getNow().equals(getNow()); }
@Override public boolean equals(Object other) { return other instanceof RepeaterYear && ((Repeater) other).getType().equals(getType()) && ((Repeater) other).getNow().equals(getNow()); }
@Override public boolean equals(Object other) { return other instanceof RepeaterSecond && ((Repeater) other).getType().equals(getType()) && ((Repeater) other).getNow().equals(getNow()); }
@Override public boolean equals(Object other) { return other instanceof RepeaterHour && ((Repeater) other).getType().equals(getType()) && ((Repeater) other).getNow().equals(getNow()); }
@Override public boolean equals(Object other) { return other instanceof RepeaterMinute && ((Repeater) other).getType().equals(getType()) && ((Repeater) other).getNow().equals(getNow()); }
@Override public boolean equals(Object other) { return other instanceof RepeaterDayPortion && ((Repeater) other).getType().equals(getType()) && ((Repeater) other).getNow().equals(getNow()); }
@Override public boolean equals(Object other) { return other instanceof RepeaterDay && ((Repeater) other).getType().equals(getType()) && ((Repeater) other).getNow().equals(getNow()); }
@Override public boolean equals(Object other) { return other instanceof RepeaterFortnight && ((Repeater) other).getType().equals(getType()) && ((Repeater) other).getNow().equals(getNow()); }