class CircularFingerprinter extends AbstractFingerprinter implements IFingerprinter {

    @Override
    public ICountFingerprint getCountFingerprint(IAtomContainer mol) throws CDKException {
        calculate(mol);

        // extract a convenient {hash:count} datastructure
        final Map<Integer, Integer> map = new TreeMap<Integer, Integer>();
        for (FP fp : fplist) {
            if (map.containsKey(fp.hashCode))
                map.put(fp.hashCode, map.get(fp.hashCode) + 1);
            else
                map.put(fp.hashCode, 1);
        }
        final int sz = map.size();
        final int[] hash = new int[sz], count = new int[sz];
        int n = 0;
        for (int h : map.keySet()) {
            hash[n] = h;
            count[n++] = map.get(h);
        }

        // implement a custom instance that provides a window directly into the summary content
        return new ICountFingerprint() {

            @Override
            public long size() {
                return 4294967296l;
            }

            @Override
            public int numOfPopulatedbins() {
                return sz;
            }

            @Override
            public int getCount(int index) {
                return count[index];
            }

            @Override
            public int getHash(int index) {
                return hash[index];
            }

            @Override
            public void merge(ICountFingerprint fp) {}

            @Override
            public void setBehaveAsBitFingerprint(boolean behaveAsBitFingerprint) {}

            @Override
            public boolean hasHash(int hash) {
                return map.containsKey(hash);
            }

            @Override
            public int getCountForHash(int hash) {
                return map.containsKey(hash) ? map.get(hash) : 0;
            }
        };
    }

    public  CircularFingerprinter();
    public  CircularFingerprinter(int classType);
    public  CircularFingerprinter(int classType, int len);

}