Is possible to know the size of a stream without using a terminal operation
问题 I have 3 interfaces public interface IGhOrg { int getId(); String getLogin(); String getName(); String getLocation(); Stream<IGhRepo> getRepos(); } public interface IGhRepo { int getId(); int getSize(); int getWatchersCount(); String getLanguage(); Stream<IGhUser> getContributors(); } public interface IGhUser { int getId(); String getLogin(); String getName(); String getCompany(); Stream<IGhOrg> getOrgs(); } and I need to implement Optional<IGhRepo> highestContributors(Stream<IGhOrg>