@Override
    public boolean equals(final Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final TimestampedKeyAndJoinSide<?> that = (TimestampedKeyAndJoinSide<?>) o;
        return leftSide == that.leftSide &&
            Objects.equals(key, that.key) &&
            timestamp == that.timestamp;
    }
Create a new {@link TimestampedKeyAndJoinSide} instance for the right join side if the provide {@code key} is not {@code null}.

@param key      the key
@param <K>      the type of the key
@return a new {@link TimestampedKeyAndJoinSide} instance for the right join side if the provide {@code key} is not {@code null}
streams/src/main/java/org/apache/kafka/streams/state/internals/TimestampedKeyAndJoinSide.java