io.github.avegera.stream.utils.Counters Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stream-utils Show documentation
Show all versions of stream-utils Show documentation
The library of laconic method-aliases for the safety Stream API operations on Java-collections
The newest version!
package io.github.avegera.stream.utils;
import java.util.Collection;
import static io.github.avegera.stream.utils.Streams.safeStream;
/**
* The class contains laconic method-aliases for safety count operations with collections in Java.
* The result of the class methods execution is a long value.
*/
public class Counters {
private Counters() {
//empty private constructor
}
public static long count(Collection collection) {
return safeStream(collection)
.count();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy