Package snap.util

Class CollectionUtils

java.lang.Object
snap.util.CollectionUtils
Direct Known Subclasses:
SetUtils

public class CollectionUtils extends Object
Utility methods for use with Java.util.Collection.
  • Constructor Details

    • CollectionUtils

      public CollectionUtils()
  • Method Details

    • hasMatch

      public static <T> boolean hasMatch(Collection<T> aList, Predicate<? super T> aPred)
      Returns whether given collection has match for given predicate.
    • findMatch

      public static <T> T findMatch(Collection<T> aList, Predicate<? super T> aPred)
      Returns the first item in collection that matches given predicate (or null).