UpdatableIntToIntMap (final @NotNull Predicate<? super Integer> thisIsVisible, final int longSize) { return new UpdatableIntToIntMapWrapper(new Flags() { @Override public int size() { return longSize; } @Override public boolean get(int index) { return thisIsVisible.test(index); } @Override public void set(int index, boolean value) { throw new UnsupportedOperationException(); } @Override public void setAll(boolean value) { throw new UnsupportedOperationException(); } }); }