TsDataBlock { public static TsDataBlock fullYears(TsData series) { TsPeriod start = series.getStart(), end = series.getEnd(); int freq = series.getFrequency().intValue(); int nbeg = start.getPosition(); if (nbeg != 0) { nbeg = freq - nbeg; } int nend = end.getPosition(); return new TsDataBlock(series, nbeg, series.getLength() - nend, 1); } TsDataBlock(TsData series, int start, int end, int inc);   TsDataBlock(TsPeriod start, DataBlock data); static TsDataBlock fullYears(TsData series); static TsDataBlock select(TsData series, TsDomain domain); static TsDataBlock select(TsData series, TsPeriodSelector selector); static TsDataBlock select(TsDataBlock data, int start, int count,
            int inc); static TsDataBlock all(TsData series); java.util.Enumeration<TsObservation> observations(); @NewObject TsPeriod period(int i); final DataBlock data; final TsPeriod start; }
@Test public void testFullYears() { TsDataBlock fullYears = TsDataBlock.fullYears(Data.X); assertTrue(fullYears.start.getPosition()==0); assertTrue(fullYears.period(fullYears.data.getEndPosition()).getPosition()==0); }