Class Function<E,​T>

  • Direct Known Subclasses:
    SerializableFunction

    public abstract class Function<E,​T>
    extends java.lang.Object
    An interface that can hold functions
    Author:
    Bhagat
    • Constructor Summary

      Constructors 
      Constructor Description
      Function()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract T f​(E x)
      The function this interface contains
      T[] g​(E... xs)
      function with multiple parameters and multiple returns
      • Methods inherited from class java.lang.Object

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

      • Function

        public Function()
    • Method Detail

      • f

        public abstract T f​(E x)
        The function this interface contains
        Parameters:
        x - the parameter of type specified by Java Generics
        Returns:
        the return of the function specified by Java Generics
      • g

        public T[] g​(E... xs)
        function with multiple parameters and multiple returns
        Parameters:
        xs - the parameters of type specified by Java Generics
        Returns:
        the return of objects of type specified by Java Generics in an array