Class Flow

  • All Implemented Interfaces:
    java.util.function.LongFunction<java.lang.Object>

    public class Flow
    extends java.lang.Object
    implements java.util.function.LongFunction<java.lang.Object>

    Combine functions into one.

    This function allows you to combine multiple other functions into one. This is often useful for constructing more sophisticated recipes, when you don't have the ability to use control flow or non-functional forms.

    The functions will be stitched together using the same logic that VirtData uses when combining flows outside functions. That said, if the functions selected are not the right ones, then it is possible to end up with the wrong data type at the end. To remedy this, be sure to add input and output qualifiers, like long-> or ->String where appropriate, to ensure that VirtData selects the right functions within the flow.

    • Constructor Summary

      Constructors 
      Constructor Description
      Flow​(java.lang.Object... funcs)  
    • Method Summary

      Modifier and Type Method Description
      java.lang.Object apply​(long value)  
      • Methods inherited from class java.lang.Object

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

      • Flow

        public Flow​(java.lang.Object... funcs)
    • Method Detail

      • apply

        public java.lang.Object apply​(long value)
        Specified by:
        apply in interface java.util.function.LongFunction<java.lang.Object>