Class Aggregate

java.lang.Object
microsim.collection.Aggregate

public class Aggregate extends Object
A utility class for aggregation tools.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> void
    applyToFilter(@Nullable Iterable<T> collection, @Nullable org.apache.commons.collections4.Predicate<T> predicate, @NonNull org.apache.commons.collections4.Closure<T> closure)
    This method filters out certain objects from the provided collection according to the predicate and applies a function to them.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Aggregate

      public Aggregate()
  • Method Details

    • applyToFilter

      public static <T> void applyToFilter(@Nullable @Nullable Iterable<T> collection, @Nullable @Nullable org.apache.commons.collections4.Predicate<T> predicate, @NonNull @NonNull org.apache.commons.collections4.Closure<T> closure)
      This method filters out certain objects from the provided collection according to the predicate and applies a function to them.
      Type Parameters:
      T - A generic type that usually represent agents.
      Parameters:
      collection - A collection of objects, can be null.
      predicate - A logical predicate to filter the collection, can be null.
      closure - A function to be applied to all filtered objects.
      Throws:
      NullPointerException - when closure is null.