int (boolean reusable) { Key<Boolean> contentKey = reusable ? REUSABLE_CONTENT_KEY : NOT_REUSABLE_CONTENT_KEY; Content[] contents = myFindContentManager.getContents(); return (int)Arrays.stream(contents).filter(content -> content.getUserData(contentKey) != null).count(); }