Class Functions

java.lang.Object
io.github.torand.javacommons.functional.Functions

public final class Functions extends Object
General purpose functions for streams.
  • Method Details

    • castTo

      public static <S, T> Function<S,T> castTo(Class<T> targetClass)
      Returns a function casting the input object to the specified class.
      Type Parameters:
      S - the input object type.
      T - the output object type.
      Parameters:
      targetClass - the class to cast to.
      Returns:
      the function object.