Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.io.Serializable;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -95,6 +96,22 @@ public String toString() {
.add("watermarkUpdate", watermarkUpdate)
.toString();
}

@Override
public int hashCode() {
return Objects.hash(processingTime, element, watermarkUpdate);
}

@Override
public boolean equals(Object other) {
if (!(other instanceof Event)) {
return false;
}
Event<?> otherEvent = (Event<?>) other;
return Objects.equals(processingTime, otherEvent.processingTime)
&& Objects.equals(watermarkUpdate, otherEvent.watermarkUpdate)
&& Objects.equals(element, otherEvent.element);
}
}

/**
Expand Down Expand Up @@ -238,6 +255,21 @@ public WindowExpirationValue(@Nullable Instant watermarkAdvance, long value) {
this.watermarkAdvance = watermarkAdvance;
this.value = value;
}

@Override
public boolean equals(Object other) {
if (!(other instanceof WindowExpirationValue)) {
return false;
}
WindowExpirationValue otherValue = (WindowExpirationValue) other;
return Objects.equals(watermarkAdvance, otherValue.watermarkAdvance)
&& value == otherValue.value;
}

@Override
public int hashCode() {
return Objects.hash(watermarkAdvance, value);
}
}

@Test
Expand Down
Loading