All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.avegera.stream.utils.Counters Maven / Gradle / Ivy

Go to download

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