Class Functions.JustValue<T,​U>

  • All Implemented Interfaces:
    Function<T,​U>, Supplier<U>, java.util.concurrent.Callable<U>
    Enclosing class:
    Functions

    static final class Functions.JustValue<T,​U>
    extends java.lang.Object
    implements java.util.concurrent.Callable<U>, Supplier<U>, Function<T,​U>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) U value  
    • Constructor Summary

      Constructors 
      Constructor Description
      JustValue​(U value)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      U apply​(T t)
      Apply some calculation to the input value and return some other value.
      U call()  
      U get()
      Produces a value or throws an exception.
      • Methods inherited from class java.lang.Object

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

      • value

        final U value
    • Constructor Detail

      • JustValue

        JustValue​(U value)
    • Method Detail

      • call

        public U call()
        Specified by:
        call in interface java.util.concurrent.Callable<T>
      • apply

        public U apply​(T t)
        Description copied from interface: Function
        Apply some calculation to the input value and return some other value.
        Specified by:
        apply in interface Function<T,​U>
        Parameters:
        t - the input value
        Returns:
        the output value
      • get

        public U get()
        Description copied from interface: Supplier
        Produces a value or throws an exception.
        Specified by:
        get in interface Supplier<T>
        Returns:
        the value produced