class CategorizedCircularBuffer {

    public List<T> subList(int fromIndex, int toIndex) {
        List<T> ret = new ArrayList<T>(toIndex - fromIndex);
        for (Pair<T, K> pair : mainList.subList(fromIndex, toIndex)) {
            ret.add(pair.value);
        }

        return ret;
    }

    public  CategorizedCircularBuffer(int maxCount);

}