Examples of TickBuilder


Examples of org.jboss.errai.cdi.demo.stock.client.shared.TickBuilder

    }
  }

  private Tick generateTick(Tick oldTick) {
    BigDecimal change = new BigDecimal(random.nextGaussian() * (oldTick.getPrice().doubleValue() / 1000), FOUR_DIGITS_PRECISION);
    TickBuilder newTick = new TickBuilder(oldTick.getSymbol())
      .time(new Date())
      .price(oldTick.getPrice().add(change))
      .change(change);
    return newTick.toTick();
  }
View Full Code Here

Examples of org.jboss.errai.cdi.demo.stock.client.shared.TickBuilder

  }

  private static final MathContext FOUR_DIGITS_PRECISION = new MathContext(4);

  private Tick generateBootstrapTick(String symbol) {
    return new TickBuilder(symbol)
      .time(new Date())
      .price(new BigDecimal(random.nextDouble() * 150, FOUR_DIGITS_PRECISION))
      .toTick();
  }
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.