Package com.barchart.feed.base.book.api

Examples of com.barchart.feed.base.book.api.MarketDoBookEntry


    return entry == null ? NULL_BOOK_ENTRY : entry;
  }

  @Override
  public final MarketBookEntry top(final Book.Side side) {
    final MarketDoBookEntry entry = topFor(side);
    return entry == null ? NULL_BOOK_ENTRY : entry;
  }
View Full Code Here


      market.setChange(Component.BOOK_COMBINED);
     
      final PriceValue priceBid = message.getPriceBid();
      final PriceValue priceAsk = message.getPriceAsk();

      /** XXX note: {@link MarketBook#ENTRY_TOP} */

      final MarketDoBookEntry entryBid = new DefBookEntry(
          MODIFY, Book.Side.BID,
          Book.Type.DEFAULT, ENTRY_TOP, priceBid, ValueConst.NULL_SIZE);
      final MarketDoBookEntry entryAsk = new DefBookEntry(
          MODIFY, Book.Side.ASK,
          Book.Type.DEFAULT, ENTRY_TOP, priceAsk, ValueConst.NULL_SIZE);

      applyTop(entryBid, time, market);
      applyTop(entryAsk, time, market);
View Full Code Here

  public String toString() {

    final StringBuilder text = new StringBuilder(1024);

    for (int index = bids.head(); index <= bids.tail(); index++) {
      MarketDoBookEntry entry = bids.get(index);
      if (entry == null) {
        entry = nullEntry(index);
      }
      text.append(entry);
      text.append("\n");
    }

    final int gap = asks.head() - bids.tail();
    if (gap <= size) {
      for (int index = bids.tail() + 1; index < asks.head(); index++) {
        final DefBookEntry entry = nullEntry(index);
        text.append(entry);
        text.append("\n");
      }
    }

    for (int index = asks.head(); index <= asks.tail(); index++) {
      MarketDoBookEntry entry = asks.get(index);
      if (entry == null) {
        entry = nullEntry(index);
      }
      text.append(entry);
      text.append("\n");
View Full Code Here

  public String toString() {

    final StringBuilder text = new StringBuilder(1024);

    for (int index = bids.head(); index <= bids.tail(); index++) {
      MarketDoBookEntry entry = bids.get(index);
      if (entry == null) {
        entry = nullEntry(index);
      }
      text.append(entry);
      text.append("\n");
    }

    final int gap = asks.head() - bids.tail();
    if (gap <= size) {
      for (int index = bids.tail() + 1; index < asks.head(); index++) {
        final DefBookEntry entry = nullEntry(index);
        text.append(entry);
        text.append("\n");
      }
    }

    for (int index = asks.head(); index <= asks.tail(); index++) {
      MarketDoBookEntry entry = asks.get(index);
      if (entry == null) {
        entry = nullEntry(index);
      }
      text.append(entry);
      text.append("\n");
View Full Code Here

    {

      final PriceValue priceBid = message.getPriceBid();
      final PriceValue priceAsk = message.getPriceAsk();

      final MarketDoBookEntry entryBid = new DefBookEntry(
          MODIFY, Book.Side.BID,
          Book.Type.DEFAULT, ENTRY_TOP, priceBid, ValueConst.NULL_SIZE);
      final MarketDoBookEntry entryAsk = new DefBookEntry(
          MODIFY, Book.Side.ASK,
          Book.Type.DEFAULT, ENTRY_TOP, priceAsk, ValueConst.NULL_SIZE);

      applyTop(entryBid, time, market);
      applyTop(entryAsk, time, market);
View Full Code Here

    return entry == null ? NULL_BOOK_ENTRY : entry;
  }

  @Override
  public final MarketBookEntry top(final Book.Side side) {
    final MarketDoBookEntry entry = topFor(side);
    return entry == null ? NULL_BOOK_ENTRY : entry;
  }
View Full Code Here

      price = ValueConst.NULL_PRICE;
      size = ValueConst.NULL_SIZE;
      break;
    }

    /** XXX note: {@link MarketBook#ENTRY_TOP} */
    final MarketDoBookEntry entry = new DefBookEntry(
        MODIFY, side, Book.Type.DEFAULT,
        MarketBook.ENTRY_TOP, price, size);

    return entry;
View Full Code Here

    return entry == null ? NULL_BOOK_ENTRY : entry;
  }

  @Override
  public final MarketBookEntry top(final MarketBookSide side) {
    final MarketDoBookEntry entry = topFor(side);
    return entry == null ? NULL_BOOK_ENTRY : entry;
  }
View Full Code Here

  public String toString() {

    final StringBuilder text = new StringBuilder(1024);

    for (int index = bids.head(); index <= bids.tail(); index++) {
      MarketDoBookEntry entry = bids.get(index);
      if (entry == null) {
        entry = nullEntry(index);
      }
      text.append(entry);
      text.append("\n");
    }

    final int gap = asks.head() - bids.tail();
    if (gap <= size) {
      for (int index = bids.tail() + 1; index < asks.head(); index++) {
        final DefBookEntry entry = nullEntry(index);
        text.append(entry);
        text.append("\n");
      }
    }

    for (int index = asks.head(); index <= asks.tail(); index++) {
      MarketDoBookEntry entry = asks.get(index);
      if (entry == null) {
        entry = nullEntry(index);
      }
      text.append(entry);
      text.append("\n");
View Full Code Here

    return entry == null ? NULL_BOOK_ENTRY : entry;
  }

  @Override
  public final MarketBookEntry top(final Book.Side side) {
    final MarketDoBookEntry entry = topFor(side);
    return entry == null ? NULL_BOOK_ENTRY : entry;
  }
View Full Code Here

TOP

Related Classes of com.barchart.feed.base.book.api.MarketDoBookEntry

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.