Package com.barchart.feed.base.values.api

Examples of com.barchart.feed.base.values.api.PriceValue


  }

  @Override
  public final boolean equals(final Object thatValue) {
    if (thatValue instanceof PriceValue) {
      PriceValue that = (PriceValue) thatValue;
      return this.compareTo(that) == 0;
    }
    return false;
  }
View Full Code Here


      final String pricePointString =
          xmlStringDecode(ats, PRICE_POINT_VALUE, XML_PASS);
      if (pricePointString == null || pricePointString.isEmpty()) {
        builder.setContractPointValue(buildDecimal(0, 0));
      } else {
        final PriceValue pricePoint =
            ValueBuilder.newPrice(Double.valueOf(pricePointString));
        builder.setContractPointValue(buildDecimal(
            pricePoint.mantissa(), pricePoint.exponent()));
      }

      /* display fraction base : decimal(10) vs binary(2), etc. */
      builder.setDisplayBase((int) frac.fraction.base());
      builder.setDisplayExponent(frac.fraction.exponent());
View Full Code Here

  }

  @Override
  public final MarketCuvolEntry getLastEntry() {

    final PriceValue price = priceLast;

    if (price == null) {
      return MarketConst.NULL_CUVOL_ENTRY;
    }
   
View Full Code Here

    for (int index = 0; index < length; index++) {
      final long sizeValue = array[index];
      if (sizeValue > 0) {
        final int place = entryIndex + 1;
        final long mantissa = priceFirst + index * priceStep;
        final PriceValue price = ValueBuilder.newPrice(mantissa,
            exponent);
        final SizeValue size = ValueBuilder.newSize(sizeValue);
        final MarketDoCuvolEntry entry = new DefCuvolEntry(
            place, price, size);
        entries[entryIndex++] = entry;
View Full Code Here

    for (int index = 0; index < length; index++) {
      final long sizeValue = array[index];
      if (sizeValue > 0) {
        final int place = entryIndex + 1;
        final long mantissa = priceFirst + index * priceStep;
        final PriceValue price = ValueBuilder.newPrice(mantissa,
            exponent);
        final SizeValue size = ValueBuilder.newSize(sizeValue);
        final MarketDoCuvolEntry entry = new DefCuvolEntry(
            place, price, size);
        entries[entryIndex++] = entry;
View Full Code Here

   */
  @Override
  public final MarketDoBookEntry entry(final Instrument instrument,
      final Book.Side side) {

    final PriceValue price;
    final SizeValue size;

    switch (side) {
    case BID:
      price = getPriceBid();
View Full Code Here

TOP

Related Classes of com.barchart.feed.base.values.api.PriceValue

Copyright © 2018 www.massapicom. 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.