Class Functions


  • public class Functions
    extends java.lang.Object
    Helper class handling specialized types of ChainFunction
    • Constructor Summary

      Constructors 
      Constructor Description
      Functions()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <SOURCE,​TARGET>
      ChainFunction<SOURCE,​TARGET>
      ofSupplierConstrainedBy​(java.util.function.Supplier<TARGET> supplier, java.util.function.Predicate<SOURCE> conditionalTo)
      Returns a ChainFunction that will delegate when the provided Predicate is not satisfied
      • Methods inherited from class java.lang.Object

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

      • Functions

        public Functions()
    • Method Detail

      • ofSupplierConstrainedBy

        public static <SOURCE,​TARGET> ChainFunction<SOURCE,​TARGET> ofSupplierConstrainedBy​(java.util.function.Supplier<TARGET> supplier,
                                                                                                       java.util.function.Predicate<SOURCE> conditionalTo)
        Returns a ChainFunction that will delegate when the provided Predicate is not satisfied
        Parameters:
        supplier - the supplier to be called when the predicate is satisfied
        conditionalTo - the predicate that will cause the return of the supplier execution or will delegate to the next ChainFunction
        Returns:
        a ChainFunction