class TsData implements Cloneable, Iterable<TsObservation>, IReadDataBlock {

    public TsData drop(final int nfirst, final int nlast) {
        TsPeriod s = getStart();
        s.move(nfirst);
        int n = vals.length - nfirst - nlast;
        if (n < 0) {
            n = 0;
        }
        TsData nts = new TsData(s, n);
        if (n == 0) {
            return nts;
        }
        int nc = n;
        int s0, t0;
        if (nfirst < 0) {
            nc += nfirst;
            t0 = -nfirst;
            s0 = 0;
            Arrays.fill(nts.vals, 0, -nfirst, Double.NaN);
        } else {
            s0 = nfirst;
            t0 = 0;
        }
        if (nlast < 0) {
            nc += nlast;
            Arrays.fill(nts.vals, nts.vals.length + nlast, nts.vals.length, Double.NaN);
        }
        if (nc > 0) {
            System.arraycopy(vals, s0, nts.vals, t0, nc);
        }
        return nts;
    }

    public  TsData(final TsDomain dom);
    public  TsData(final TsDomain dom, double val);
      TsData(final TsFrequency freq, final int beg, final int count);
    public  TsData(final TsFrequency freq, final int firstyear,
            final int firstperiod, final double[] data, boolean copydata);
    public  TsData(final TsFrequency freq, final int firstyear,
            final int firstperiod, final int count);
    public  TsData(final TsPeriod start, final double[] data, boolean copydata);
    public  TsData(final TsPeriod start, final int count);
    public  TsData(final TsPeriod start, final IReadDataBlock vals);

}