public class IntervalWindow extends BoundedWindow implements Comparable<IntervalWindow>
BoundedWindow that represents an interval from
start (inclusive) to end (exclusive).TIMESTAMP_MAX_VALUE, TIMESTAMP_MIN_VALUE| Constructor and Description |
|---|
IntervalWindow(Instant start,
Instant end)
Creates a new IntervalWindow that represents the half-open time
interval [start, end).
|
IntervalWindow(Instant start,
ReadableDuration size) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(IntervalWindow o) |
boolean |
contains(IntervalWindow other)
Returns whether this window contains the given window.
|
Instant |
end()
Returns the end of this window, exclusive.
|
boolean |
equals(Object o) |
static Coder<IntervalWindow> |
getCoder()
Returns a
Coder suitable for IntervalWindow. |
int |
hashCode() |
boolean |
intersects(IntervalWindow other)
Returns whether this window intersects the given window.
|
boolean |
isDisjoint(IntervalWindow other)
Returns whether this window is disjoint from the given window.
|
Instant |
maxTimestamp()
Returns the largest timestamp that can be included in this window.
|
IntervalWindow |
span(IntervalWindow other)
Returns the minimal window that includes both this window and
the given window.
|
Instant |
start()
Returns the start of this window, inclusive.
|
String |
toString() |
public IntervalWindow(Instant start, Instant end)
public IntervalWindow(Instant start, ReadableDuration size)
public Instant start()
public Instant end()
public Instant maxTimestamp()
maxTimestamp in class BoundedWindowpublic boolean contains(IntervalWindow other)
public boolean isDisjoint(IntervalWindow other)
public boolean intersects(IntervalWindow other)
public IntervalWindow span(IntervalWindow other)
public int compareTo(IntervalWindow o)
compareTo in interface Comparable<IntervalWindow>public static Coder<IntervalWindow> getCoder()
Coder suitable for IntervalWindow.