Class ListUtils

java.lang.Object
com.dlsc.gemsfx.util.ListUtils

public class ListUtils extends Object
Utility methods for working with lists.
  • Constructor Details

    • ListUtils

      public ListUtils()
  • Method Details

    • replaceIf

      public static <T> boolean replaceIf(List<T> list, Predicate<T> matchPredicate, T newValue)
      Replaces matching elements in the list with the provided new value.
      Type Parameters:
      T - the type of elements in the list
      Parameters:
      list - the list to operate on
      matchPredicate - the predicate to match elements
      newValue - the new value to replace matching elements