Class NukkitCollectors

java.lang.Object
cn.nukkit.utils.NukkitCollectors

@PowerNukkitOnly @Since("1.4.0.0-PN") public final class NukkitCollectors extends Object
Since:
2021-03-26
Author:
joserobjr
  • Method Details

    • countingInt

      @PowerNukkitOnly @Since("1.4.0.0-PN") public static <T> Collector<T,?,Integer> countingInt()
      Returns a Collector accepting elements of type T that counts the number of input elements. If no elements are present, the result is 0.
      Type Parameters:
      T - the type of the input elements
      Returns:
      a Collector that counts the input elements