Class Empty<A>

java.lang.Object
com.jnape.palatable.lambda.functions.builtin.fn1.Empty<A>
Type Parameters:
A - the iterable element type
All Implemented Interfaces:
Fn1<Iterable<A>, Boolean>, Predicate<Iterable<A>>, Applicative<Boolean, Fn1<Iterable<A>, ?>>, Cartesian<Iterable<A>, Boolean, Fn1<?,?>>, Cocartesian<Iterable<A>, Boolean, Fn1<?,?>>, Contravariant<Iterable<A>, Profunctor<?,Boolean,Fn1<?,?>>>, Functor<Boolean, Fn1<Iterable<A>, ?>>, Profunctor<Iterable<A>, Boolean, Fn1<?,?>>, Monad<Boolean, Fn1<Iterable<A>, ?>>, MonadReader<Iterable<A>, Boolean, Fn1<Iterable<A>, ?>>, MonadRec<Boolean, Fn1<Iterable<A>, ?>>, MonadWriter<Iterable<A>, Boolean, Fn1<Iterable<A>, ?>>

public final class Empty<A> extends Object implements Predicate<Iterable<A>>
A predicate that returns true if as is empty; false otherwise.
  • Field Details

    • INSTANCE

      private static final Empty<?> INSTANCE
  • Constructor Details

    • Empty

      private Empty()
  • Method Details

    • checkedApply

      public Boolean checkedApply(Iterable<A> as)
      Description copied from interface: Fn1
      Invoke this function with the given argument, potentially throwing any Throwable.
      Specified by:
      checkedApply in interface Fn1<Iterable<A>, Boolean>
      Parameters:
      as - the argument
      Returns:
      the result of the function application
    • empty

      public static <A> Empty<A> empty()
    • empty

      public static <A> Boolean empty(Iterable<A> as)