class MultiStereoEncoder implements StereoEncoder {

    @Override
    public boolean encode(long[] current, long[] next) {
        boolean configured = false;

        for (int i = unconfigured.nextSetBit(0); i >= 0; i = unconfigured.nextSetBit(i + 1)) {

            if (encoders.get(i).encode(current, next)) {
                unconfigured.clear(i); // don't configure again (unless reset)
                configured = true;
            }
        }
        return configured;
    }

    public  MultiStereoEncoder(List<StereoEncoder> encoders);

}