@Override
    public int[] getWindowIndices(int idx) {
        Date beginning = getWindowBounds(idx)[0];
        Date end = getWindowBounds(idx)[1];


        int first = -1;
        int last = -1;
        if (current.get(0).getStart().after(end) || current.get(current.size() - 1).getStart().before(beginning))
            return null;
        for (int i = 0; i < current.size(); i++) {
            if (current.get(i).getStart().before(beginning)) continue;
            else if (first < 0) {
                first = i;
            }
            if (current.get(i).getStart().equals(end) || current.get(i).getStart().after(end)) {
                last = i;
                break;
            }


        }
        if (first < 0) return null;
        if (last < 0) {
            last = current.size();
        }
        return new int[]{first,last};
    }