Class UtilityFunctions



  • public final class UtilityFunctions
    extends Object
    Utility functions for internal use that we don't want part of the public API.
    • Constructor Detail

      • UtilityFunctions

        public UtilityFunctions()
    • Method Detail

      • alwaysTrue

        public static <T> Func1<? super T,Boolean> alwaysTrue()
        Returns a function that always returns true.
        Returns:
        a Func1 that accepts an Object and returns the Boolean true
      • alwaysFalse

        public static <T> Func1<? super T,Boolean> alwaysFalse()
        Returns a function that always returns false.
        Returns:
        a Func1 that accepts an Object and returns the Boolean false
      • identity

        public static <T> Func1<T,T> identity()
        Returns a function that always returns the Object it is passed.
        Returns:
        a Func1 that accepts an Object and returns the same Object
      • returnNull

        public static <T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,R> rx.internal.util.UtilityFunctions.NullFunction<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,R> returnNull()
        Returns a function that merely returns null, without side effects.
        Returns:
        a function that returns null