Class ToLongFunction

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

    public class ToLongFunction
    extends java.lang.Object
    implements java.util.function.LongFunction<java.lang.Object>
    Adapts any compatible FunctionalInterface type to a LongFunction, for use with higher-order functions, when they require a LongFunction as an argument. Some of the higher-order functions within this library specifically require a LongFunction as an argument, while some of the other functions are provided in semantically equivalent forms with compatible types which can't be converted directly or automatically by Java. In such cases, those types of functions can be wrapped with the forms described here in order to allow the inner and outer functions to work together.
    • Constructor Summary

      Constructors 
      Constructor Description
      ToLongFunction​(java.util.function.Function<java.lang.Long,​java.lang.Long> op)  
      ToLongFunction​(java.util.function.LongFunction<?> func)  
      ToLongFunction​(java.util.function.LongToDoubleFunction op)  
      ToLongFunction​(java.util.function.LongToIntFunction op)  
      ToLongFunction​(java.util.function.LongUnaryOperator op)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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

      • ToLongFunction

        public ToLongFunction​(java.util.function.LongUnaryOperator op)
      • ToLongFunction

        public ToLongFunction​(java.util.function.Function<java.lang.Long,​java.lang.Long> op)
      • ToLongFunction

        public ToLongFunction​(java.util.function.LongToIntFunction op)
      • ToLongFunction

        public ToLongFunction​(java.util.function.LongToDoubleFunction op)
      • ToLongFunction

        public ToLongFunction​(java.util.function.LongFunction<?> func)
    • Method Detail

      • apply

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