Handler (final Content content) { return new Handler(content.isPinned(), Objects.requireNonNull(content.getManager()).getSelectedContent() == content) { @Override void setPinned(boolean value) { content.setPinned(value); } }; }