Examples of Calculator


Examples of er.examples.erjaxws.ws.Calculator

        ERJaxWebServiceRequestHandler wsHandler = new ERJaxWebServiceRequestHandler();
        wsHandler.registerWebService("Calculator", new ERJaxWebService<Calculator>(Calculator.class));
        this.registerRequestHandler(wsHandler, this.webServiceRequestHandlerKey());

        // create a standalone endpoint using Jax WS mechanisms
        Endpoint.publish("http://localhost:9999/ws/Calculator", new Calculator());
  }
View Full Code Here

Examples of es.ign4ci0.kata.stringCalculator.Calculator

    private Calculator _calculator = null;
   
    @Before
    public void initializeCalculator ( )
    {
        _calculator = new Calculator ( );
    }
View Full Code Here

Examples of l2p.gameserver.skills.Calculator

    _calculators = new Calculator[Stats.NUM_STATS];
    if(isPlayer())
    {
      for(Stats stat : Stats.values())
      {
        _calculators[stat.ordinal()] = new Calculator(stat, this);
      }
    }
    if(template != null && (isNpc() || this instanceof L2Summon))
    {
      if(((L2NpcTemplate) template).getSkills().size() > 0)
View Full Code Here

Examples of lineage2.gameserver.stats.Calculator

    int stat = f.stat.ordinal();
    synchronized (_calculators)
    {
      if (_calculators[stat] == null)
      {
        _calculators[stat] = new Calculator(f.stat, this);
      }
      _calculators[stat].addFunc(f);
    }
  }
View Full Code Here

Examples of net.buffalo.protocal.acceptance.Calculator

   
  }
 
  public void testCanInvokeNumberInsteadOfConcreteNumber() throws Exception {
    Method method = Calculator.class.getMethod("longSum", new Class[]{Long.class, Long.class});
    Object result = ClassUtil.invokeMethod(new Calculator(), method, new Object[]{new Integer(1), new Integer(2)});
    assertEquals(new Long(3), result);
  }
View Full Code Here

Examples of net.sf.l2j.gameserver.skills.Calculator

    if (_activeChar == null)
      return init;

    int id = stat.ordinal();

    Calculator c = _activeChar.getCalculators()[id];

    // If no Func object found, no modifier is applied
    if (c == null || c.size() == 0)
      return init;

    // Create and init an Env object to pass parameters to the Calculator
    Env env = new Env();
    env.player = _activeChar;
    env.target = target;
    env.skill = skill;
    env.value = init;

    // Launch the calculation
    c.calc(env);
    // avoid some troubles with negative stats (some stats should never be
    // negative)
    if (env.value <= 0
        && ((stat == Stats.MAX_HP) || (stat == Stats.MAX_MP) || (stat == Stats.MAX_CP) || (stat == Stats.MAGIC_DEFENCE)
            || (stat == Stats.POWER_DEFENCE) || (stat == Stats.POWER_ATTACK) || (stat == Stats.MAGIC_ATTACK) || (stat == Stats.POWER_ATTACK_SPEED)
View Full Code Here

Examples of net.sf.l2j.gameserver.skills.Calculator

     
      for (int i = 0; i < Stats.NUM_STATS; i++)
      {
        if (NPC_STD_CALCULATOR[i] != null)
        {
          _calculators[i] = new Calculator(NPC_STD_CALCULATOR[i]);
        }
      }
    }
   
    // Select the Calculator of the affected state in the Calculator set
    int stat = f.stat.ordinal();
   
    if (_calculators[stat] == null)
    {
      _calculators[stat] = new Calculator();
    }
   
    // Add the Func to the calculator corresponding to the state
    _calculators[stat].addFunc(f);
   
View Full Code Here

Examples of net.sourceforge.align.calculator.Calculator

   * but based on Forward Backward method instead of Viterbi method.
   */
  @Before
  public void setUp() {
    Counter counter = new CharCounter();
    Calculator calculator = new NormalDistributionCalculator(counter);
    MatrixFactory matrixFactory = new FullMatrixFactory();
   
    algorithm = new ForwardBackwardAlgorithm(calculator,
        CategoryDefaults.BEST_CATEGORY_MAP, matrixFactory);
  }
View Full Code Here

Examples of net.sourceforge.stat4j.Calculator

  public Calculator createCalculator(String name, Statistic statistic) {
    String prefix = "calculator." + name + ".";
    //System.out.println(prefix + "classname");
    String className = bundle.getString(prefix + "classname");
    Calculator c = (Calculator) Util.createObject(className);
    Properties p = Util.createProperties(prefix);
    c.init(name, p);
    c.setStatistic(statistic);
    return c;
  }
View Full Code Here

Examples of org.apache.examples.Calculator

        double arg1 = Double.parseDouble(args[1]);

        AnnotatedRegistryBuilder builder = new AnnotatedRegistryBuilder();
        TypedRegistry registry = builder.constructRegistry(CalculatorModule.class);
       
        Calculator calculator = registry.getService(Calculator.class);

        System.out.println("Inputs:   " + arg0 + " and " + arg1);
        System.out.println("Add:      " + calculator.add(arg0, arg1));
        System.out.println("Subtract: " + calculator.subtract(arg0, arg1));
        System.out.println("Multiply: " + calculator.multiply(arg0, arg1));
        System.out.println("Divide:   " + calculator.divide(arg0, arg1));


        registry.shutdown();
    }
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.