WindowedValue { public static <T> WindowedValue<T> of( T value, Instant timestamp, Collection<? extends BoundedWindow> windows, PaneInfo pane) { checkArgument(pane != null, "WindowedValue requires PaneInfo, but it was null"); checkArgument(windows.size() > 0, "WindowedValue requires windows, but there were none"); if (windows.size() == 1) { return of(value, timestamp, windows.iterator().next(), pane); } else { return new TimestampedValueInMultipleWindows<>(value, timestamp, windows, pane); } }  static WindowedValue<T> of(
      T value, Instant timestamp, Collection<? extends BoundedWindow> windows, PaneInfo pane); static WindowedValue<T> of(
      T value, Instant timestamp, BoundedWindow window, PaneInfo pane); static WindowedValue<T> valueInGlobalWindow(T value); static WindowedValue<T> valueInGlobalWindow(T value, PaneInfo pane); static WindowedValue<T> timestampedValueInGlobalWindow(T value, Instant timestamp); abstract WindowedValue<NewT> withValue(NewT value); abstract T getValue(); abstract Instant getTimestamp(); abstract Collection<? extends BoundedWindow> getWindows(); abstract PaneInfo getPane(); boolean isSingleWindowedValue(); Iterable<WindowedValue<T>> explodeWindows(); @Override boolean equals(@Nullable Object other); @Override int hashCode(); @Override abstract String toString(); static FullWindowedValueCoder<T> getFullCoder(
      Coder<T> valueCoder, Coder<? extends BoundedWindow> windowCoder); static ValueOnlyWindowedValueCoder<T> getValueOnlyCoder(Coder<T> valueCoder); static ParamWindowedValueCoder<T> getParamWindowedValueCoder(Coder<T> valueCoder);  }
@Test public void testExplodeWindowsInNoWindowsCrash() { thrown.expect(IllegalArgumentException.class); WindowedValue.of("foo", Instant.now(), ImmutableList.of(), PaneInfo.NO_FIRING); }