class BJKST implements Serializable {

    public void offer(Object o) {
        for ( int i =0 ; i < numMedians; i++) {
            String binaryRepr = Long.toBinaryString(hHashers.get(i).hash(o));
            
            int zereosP = binaryRepr.length() - binaryRepr.lastIndexOf('1');
            int currentZ = limits.get(i);
            
            if (zereosP >= currentZ) {
                HashSet<String> currentBuffer = buffers.get(i);
                
                currentBuffer.add(String.format(lengthOfIntegerRepresentation, gHashers.get(i).hash(o)) +
                            String.format(lengthOfIntegerRepresentation, zereosP));

                while (currentBuffer.size() > bufferSize) {
                    currentZ = currentZ + 1;
                    for (Iterator<String> itr = currentBuffer.iterator(); itr.hasNext();) {
                        String element = itr.next();
                        long zeroesOld = Long.parseLong(element.substring(intLength));
                        if (zeroesOld < currentZ) {
                            itr.remove();
                        }
                    }
                }
            }
        }
    }

    public  BJKST(int numberOfMedianAttempts, int sizeOfEachMedianSet);
    public  BJKST(int numberOfMedianAttempts, int sizeOfEachMedianSet, double allowedError);

}