Package com.barchart.util.values.api

Examples of com.barchart.util.values.api.SizeValue


    final int size = map.size();

    final SizeValue[] entries = new SizeValue[size];

    for (int k = 0; k < size; k++) {
      SizeValue volume = map.get(k);
      if (volume == null) {
        volume = ValueConst.NULL_SIZE;
      } else {
        volume = volume.freeze();
      }
      entries[k] = volume;
    }

    return entries;
View Full Code Here


    if (price == null) {
      return MarketConst.NULL_CUVOL_ENTRY;
    }

    final SizeValue size = map.get(price);

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

      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

      case COMBINED:
        type = Book.Type.COMBINED;
        break;
      }

      final SizeValue size = LIMIT; // inst.get(BOOK_SIZE);
     
      // ValueConverter
      final PriceValue step = ValueBuilder.newPrice(
          instrument.tickSize().mantissa(),
          instrument.tickSize().exponent());
View Full Code Here

      final int place = index + MarketBook.ENTRY_TOP;

      final PriceValue price = HelperDDF.newPriceDDF(
          priceBidArray[index], frac);

      final SizeValue size = HelperDDF.newSizeDDF(sizeBidArray[index]);

      final MarketDoBookEntry entry = new DefBookEntry(MODIFY, Book.Side.BID,
          Book.Type.DEFAULT, place, price, size);

      entries[entryIndex++] = entry;

    }

    for (int index = 0; index < countAsk; index++) {

      if (sizeAskArray[index] == 0) {
        continue;
      }

      final int place = index + 1;

      final PriceValue price = HelperDDF.newPriceDDF(
          priceAskArray[index], frac);

      final SizeValue size = HelperDDF.newSizeDDF(sizeAskArray[index]);

      final MarketDoBookEntry entry = new DefBookEntry(MODIFY, Book.Side.ASK,
          Book.Type.DEFAULT, 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();
      size = getSizeBid();
View Full Code Here

      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 boolean equals(Object thatSize) {
    if (thatSize instanceof SizeValue) {
      SizeValue that = (SizeValue) thatSize;
      return this.asLong() == that.asLong();
    }
    return false;
  }
View Full Code Here

TOP

Related Classes of com.barchart.util.values.api.SizeValue

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.