Class FunctionalUtils

java.lang.Object
software.amazon.smithy.utils.FunctionalUtils

public final class FunctionalUtils extends Object
Utilities for working with functions, predicates, etc.
  • Method Details

    • not

      public static <T> Predicate<T> not(Predicate<T> predicate)
      Negates a Predicate.
      Type Parameters:
      T - Value type of the predicate.
      Parameters:
      predicate - Predicate to negate.
      Returns:
      Returns a predicate that negates the given predicate.
    • alwaysTrue

      public static <T> Predicate<T> alwaysTrue()
      Returns a Predicate that always returns true.
      Type Parameters:
      T - Value that the predicate accepts.
      Returns:
      Returns the predicate.