Tabnine Logo
Closure1
Code IndexAdd Tabnine to your IDE (free)

How to use
Closure1
in
ch.lambdaj.function.closure

Best Java code snippets using ch.lambdaj.function.closure.Closure1 (Showing top 8 results out of 315)

origin: mariofusco/lambdaj

/**
 * Creates a closure with a single free variable and binds it to the current thread
 * @param type1 The type of the free variable of the newly created closure
 * @return The newly created closure
 */
public static <A> Closure1<A> createClosure(Class<A> type1) {
  Closure1<A> closure = new Closure1<A>();
  CLOSURES.set(closure);
  return closure;
}
origin: mariofusco/lambdaj

/**
 * Invokes this closure once for each passed variable.
 * @param vars The set of variables used to invoke this closure once for each variable
 * @return A list of Object containing the results of each closure invocation
 */
public List<?> each(A... vars) {
  return closeAll(vars);
}

origin: mariofusco/lambdaj

/**
 * Invokes this closure once by applying the given variable to it.
 * @param var The variable used to invoke this closure
 * @return The result of the closure invocation
 */
public Object apply(A var) {
  return closeOne(var);
}

origin: mariofusco/lambdaj

/**
 * Curry this closure by fixing its only free variable to a given value.
 * @param curry The value to which the free variable should be curry
 * @return A Closure having no free variable
 */
public Closure0 curry(A curry) {
  return curry(new Closure0(), curry, 1);
}
origin: jtalks-org/jcommune

/**
 * {@inheritDoc}
 */
@Override
public void createPoll(Poll poll) {
  this.getDao().saveOrUpdate(poll);
  Closure1<PollItem> closure = closure(PollItem.class);
  of(pollOptionDao).saveOrUpdate(var(PollItem.class));
  closure.each(poll.getPollItems());
  securityService.createAclBuilder().grant(GeneralPermission.WRITE)
      .to(groupDao.getGroupByName(AdministrationGroup.USER.getName()))
      .on(poll).flush();
}
origin: mariofusco/lambdaj

/**
 * Curry this closure by fixing its first free variable to a given value.
 * @param curry The value to which the first variable should be curry
 * @return A Closure having a single free variable
 */
public Closure1<B> curry1(A curry) {
  return curry(new Closure1<B>(), curry, 1);
}

origin: mariofusco/lambdaj

/**
 * Invokes this closure once for each item in the given iterable.
 * @param vars The variables used to invoke this closure once for each of its item
 * @return A list of Object containing the results of each closure invocation
 */
public List<?> each(Iterable<? extends A> vars) {
  return closeAll(vars);
}

origin: mariofusco/lambdaj

/**
 * Curry this closure by fixing its second free variable to a given value.
 * @param curry The value to which the second variable should be curry
 * @return A Closure having a single variable
 */
public Closure1<A> curry2(B curry) {
  return curry(new Closure1<A>(), curry, 2);
}
ch.lambdaj.function.closureClosure1

Javadoc

A closure with a single free variable

Most used methods

  • <init>
  • closeAll
  • closeOne
  • curry
    Curry this closure by fixing its only free variable to a given value.
  • each
    Invokes this closure once for each passed variable.

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (ScheduledExecutorService)
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (Timer)
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • JTextField (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Option (scala)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now