Examples of Lambda


Examples of com.l2jfrozen.gameserver.skills.funcs.Lambda

  protected void attachFunc(Node n, Object template, String name, Condition attachCond)
  {
    Stats stat = Stats.valueOfXml(n.getAttributes().getNamedItem("stat").getNodeValue());
    String order = n.getAttributes().getNamedItem("order").getNodeValue();
    Lambda lambda = getLambda(n, template);
    int ord = Integer.decode(getValue(order, template));
    Condition applayCond = parseCondition(n.getFirstChild(), template);
    FuncTemplate ft = new FuncTemplate(attachCond, applayCond, name, stat, ord, lambda);
    if(template instanceof L2Item)
    {
View Full Code Here

Examples of com.l2jfrozen.gameserver.skills.funcs.Lambda

  {
    String name = n.getNodeName();
    TextBuilder sb = new TextBuilder(name);
    sb.setCharAt(0, Character.toUpperCase(name.charAt(0)));
    name = sb.toString();
    Lambda lambda = getLambda(n, template);
    FuncTemplate ft = new FuncTemplate(null, null, name, null, calc.funcs.length, lambda);
    calc.addFunc(ft.getFunc(new Env(), calc));
  }
View Full Code Here

Examples of com.l2jfrozen.gameserver.skills.funcs.Lambda

      {
        self = true;
      }
    }

    Lambda lambda = getLambda(n, template);
    Condition applayCond = parseCondition(n.getFirstChild(), template);

    int abnormal = 0;

    if(attrs.getNamedItem("abnormal") != null)
View Full Code Here

Examples of com.puppetlabs.geppetto.pp.Lambda

   * <!-- end-user-doc -->
   *
   * @generated
   */
  public NotificationChain basicSetLambda(Lambda newLambda, NotificationChain msgs) {
    Lambda oldLambda = lambda;
    lambda = newLambda;
    if(eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(
        this, Notification.SET, PPPackage.WITH_LAMBDA_EXPRESSION__LAMBDA, oldLambda, newLambda);
      if(msgs == null)
View Full Code Here

Examples of com.samskivert.mustache.Mustache.Lambda

        interceptor.postHandle(request, response, handler, modelAndView);

        verify(modelAndView).addObject(eq(messageKey), captor.capture());

        // exercise the in-lined Lambda
        final Lambda lambda = captor.getValue();
        assertNotNull(lambda);

        final Template.Fragment frag = mock(Template.Fragment.class);
        final Writer out = mock(Writer.class);
        final String fragResult = "bar";
        final String fragResultWithArgs = "bar  [foo] [baz][burp]";

        when(frag.execute()).thenReturn(fragResult);
        when(localeResolver.resolveLocale(request)).thenReturn(Locale.CANADA_FRENCH);

        lambda.execute(frag, out);

        verify(messageSource, times(1)).getMessage(fragResult, new Object[]{}, Locale.CANADA_FRENCH);

        // exercise the optional args passing:
        when(frag.execute()).thenReturn(fragResultWithArgs);
        lambda.execute(frag, out);

        verify(messageSource, times(1)).getMessage(fragResult, new Object[]{"foo", "baz", "burp"}, Locale.CANADA_FRENCH);

        verifyNoMoreInteractions(messageSource);
View Full Code Here

Examples of frege.runtime.Lambda

      if (TSymbolT.M.has$env(sym))  visit(g, TSymbolT.M.env(sym), false);
      else if (TSymbolT.M.has$expr(sym)) {
        final TMaybe mbex       = TSymbolT.M.expr(sym);
        final TMaybe.DJust just = mbex._Just();
        if (just != null) {
          Lambda lam = Delayed.<Lambda>forced(just.mem1);
          final TExprT expr = Delayed.<TExprT>forced(State.evalState(lam, g));
          visit(g, expr);
        }
      }
      popSubItem();
View Full Code Here

Examples of frege.runtime.Lambda

  /**
   * run a {@link frege.prelude.PreludeBase.TState} action and return the new TGlobal state
   * @return the new state
   */
  public static TGlobal runSTG(Lazy action, TGlobal g) {
    Lambda stg = Delayed.<Lambda>forced(action);        // State (g -> (a, g))
    TTuple2 r = TState.run(stg, g).<TTuple2>forced();
    return Delayed.<TGlobal>forced( r.mem2 );
  }
View Full Code Here

Examples of frege.runtime.Lambda

   * Run a {@link frege.prelude.PreludeBase.TState} action and return the result.
   * The state must not be changed by the action.
   * @return the result
   */
  public static Object funSTG(Lazy action, TGlobal g) {
    Lambda stg = action.<Lambda>forced();        // State (g -> (a, g))
    TTuple2 r = TState.run(stg, g).<TTuple2>forced();
    return r.mem1;
  }
View Full Code Here

Examples of frege.runtime.Lambda

  /**
   * run a {@link frege.prelude.PreludeBase.TStateT TGlobal IO} action and return the new TGlobal state
   * @return the new state
   */
  public static TGlobal runSTIO(Lazy action, TGlobal g) {
    Lambda stg = Delayed.<Lambda>forced(action);        // StateT (g -> IO (a, g))
    Lambda r   = Delayed.<Lambda>forced( TStateT.run(stg, g));
    TTuple2 t  = r.apply(42).result().<TTuple2>forced();
    return Delayed.<TGlobal>forced(t.mem2);
  }
View Full Code Here

Examples of frege.runtime.Lambda

   * Run a {@link frege.prelude.PreludeBase.TState} action and return the result.
   * The state must not be changed by the action.
   * @return the result
   */
  public static Object funSTIO(Lazy action, TGlobal g) {
    Lambda stg = Delayed.<Lambda>forced(action);        // StateT (g -> IO (a, g))
    Lambda r   = Delayed.<Lambda>forced( TStateT.run(stg, g));
    TTuple2 t  = r.apply(42).result().<TTuple2>forced();
    return t.mem1;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.