@Override public <W extends Boolean> void setStore(int position, Store<W> store) { BitStore bits; if (store instanceof BitsStore) { bits = ((BitsStore) store).bits; } else if (store.count() < store.size()) { throw new IllegalArgumentException("null not settable"); } else { bits = new BitStore() { @Override public int size() { return store.size(); } @Override public boolean getBit(int index) { return store.get(index); } }; } this.bits.setStore(position, bits); }