PaneInfo { public static PaneInfo createPane(boolean isFirst, boolean isLast, Timing timing) { checkArgument(isFirst, "Indices must be provided for non-first pane info."); return createPane(isFirst, isLast, timing, 0, timing == Timing.EARLY ? -1 : 0); } private  PaneInfo(boolean isFirst, boolean isLast, Timing timing, long index, long onTimeIndex); static PaneInfo createPane(boolean isFirst, boolean isLast, Timing timing); static PaneInfo createPane(
      boolean isFirst, boolean isLast, Timing timing, long index, long onTimeIndex); static PaneInfo decodePane(byte encodedPane); boolean isUnknown(); boolean isFirst(); boolean isLast(); Timing getTiming(); long getIndex(); long getNonSpeculativeIndex(); @Override int hashCode(); @Override boolean equals(@Nullable Object obj); @Override String toString(); static final PaneInfo NO_FIRING; static final PaneInfo ON_TIME_AND_ONLY_FIRING; }
@Test public void testInterned() throws Exception { assertSame( PaneInfo.createPane(true, true, Timing.EARLY), PaneInfo.createPane(true, true, Timing.EARLY)); }
@Test public void testEncodingRoundTrip() throws Exception { Coder<PaneInfo> coder = PaneInfo.PaneInfoCoder.INSTANCE; for (Timing timing : Timing.values()) { long onTimeIndex = timing == Timing.EARLY ? -1 : 37; CoderProperties.coderDecodeEncodeEqual( coder, PaneInfo.createPane(false, false, timing, 389, onTimeIndex)); CoderProperties.coderDecodeEncodeEqual( coder, PaneInfo.createPane(false, true, timing, 5077, onTimeIndex)); CoderProperties.coderDecodeEncodeEqual(coder, PaneInfo.createPane(true, false, timing, 0, 0)); CoderProperties.coderDecodeEncodeEqual(coder, PaneInfo.createPane(true, true, timing, 0, 0)); } }