Class LTEWith<A>

  • Type Parameters:
    A - the value type
    All Implemented Interfaces:
    Fn1<java.util.Comparator<A>,​Fn1<A,​Fn1<A,​java.lang.Boolean>>>, Fn2<java.util.Comparator<A>,​A,​Fn1<A,​java.lang.Boolean>>, Fn3<java.util.Comparator<A>,​A,​A,​java.lang.Boolean>, Applicative<Fn1<A,​Fn1<A,​java.lang.Boolean>>,​Fn1<java.util.Comparator<A>,​?>>, Cartesian<java.util.Comparator<A>,​Fn1<A,​Fn1<A,​java.lang.Boolean>>,​Fn1<?,​?>>, Cocartesian<java.util.Comparator<A>,​Fn1<A,​Fn1<A,​java.lang.Boolean>>,​Fn1<?,​?>>, Contravariant<java.util.Comparator<A>,​Profunctor<?,​Fn1<A,​Fn1<A,​java.lang.Boolean>>,​Fn1<?,​?>>>, Functor<Fn1<A,​Fn1<A,​java.lang.Boolean>>,​Fn1<java.util.Comparator<A>,​?>>, Profunctor<java.util.Comparator<A>,​Fn1<A,​Fn1<A,​java.lang.Boolean>>,​Fn1<?,​?>>, Monad<Fn1<A,​Fn1<A,​java.lang.Boolean>>,​Fn1<java.util.Comparator<A>,​?>>, MonadReader<java.util.Comparator<A>,​Fn1<A,​Fn1<A,​java.lang.Boolean>>,​Fn1<java.util.Comparator<A>,​?>>, MonadRec<Fn1<A,​Fn1<A,​java.lang.Boolean>>,​Fn1<java.util.Comparator<A>,​?>>, MonadWriter<java.util.Comparator<A>,​Fn1<A,​Fn1<A,​java.lang.Boolean>>,​Fn1<java.util.Comparator<A>,​?>>

    public final class LTEWith<A>
    extends java.lang.Object
    implements Fn3<java.util.Comparator<A>,​A,​A,​java.lang.Boolean>
    Given a Comparator from some type A and two values of type A, return true if the second value is less than or equal to the first value in terms of their mapped B results according to Comparator.compare(Object, Object); otherwise, return false.
    See Also:
    LTE, LTEBy, GTEWith
    • Field Detail

      • INSTANCE

        private static final LTEWith<?> INSTANCE
    • Constructor Detail

      • LTEWith

        private LTEWith()
    • Method Detail

      • apply

        public BiPredicate<A,​A> apply​(java.util.Comparator<A> compareFn)
        Description copied from interface: Fn3
        Partially apply this function by taking its first argument.
        Specified by:
        apply in interface Fn1<java.util.Comparator<A>,​Fn1<A,​Fn1<A,​java.lang.Boolean>>>
        Specified by:
        apply in interface Fn2<java.util.Comparator<A>,​A,​Fn1<A,​java.lang.Boolean>>
        Specified by:
        apply in interface Fn3<java.util.Comparator<A>,​A,​A,​java.lang.Boolean>
        Parameters:
        compareFn - the first argument
        Returns:
        an Fn2<B, C, D>
      • apply

        public Predicate<A> apply​(java.util.Comparator<A> compareFn,
                                  A x)
        Description copied from interface: Fn3
        Partially apply this function by taking its first two arguments.
        Specified by:
        apply in interface Fn2<java.util.Comparator<A>,​A,​Fn1<A,​java.lang.Boolean>>
        Specified by:
        apply in interface Fn3<java.util.Comparator<A>,​A,​A,​java.lang.Boolean>
        Parameters:
        compareFn - the first argument
        x - the second argument
        Returns:
        an Fn1<C, D>
      • checkedApply

        public java.lang.Boolean checkedApply​(java.util.Comparator<A> comparator,
                                              A a,
                                              A a2)
        Specified by:
        checkedApply in interface Fn3<java.util.Comparator<A>,​A,​A,​java.lang.Boolean>
      • lteWith

        public static <A> LTEWith<A> lteWith()
      • lteWith

        public static <A> BiPredicate<A,​A> lteWith​(java.util.Comparator<A> comparator)
      • lteWith

        public static <A> Predicate<A> lteWith​(java.util.Comparator<A> comparator,
                                               A y)
      • lteWith

        public static <A> java.lang.Boolean lteWith​(java.util.Comparator<A> comparator,
                                                    A y,
                                                    A x)