Пример #1
0
  /** entry overrides message; 0 is default */
  public static int getSizeExponent(
      final MarketMessageOrBuilder message, final MarketEntryOrBuilder entry) {

    if (entry.hasSizeExponent()) {
      return entry.getSizeExponent();
    }

    if (message.hasSizeExponent()) {
      return message.getSizeExponent();
    }

    return 0;
  }
Пример #2
0
  /** entry overrides message; 0 is default */
  public static long getMarketId(
      final MarketMessageOrBuilder message, final MarketEntryOrBuilder entry) {

    if (entry.hasMarketId()) {
      return entry.getMarketId();
    }

    if (message.hasMarketId()) {
      return message.getMarketId();
    }

    return 0;
  }
Пример #3
0
  /** entry price mantissa must be present */
  public static boolean hasPrice(
      final MarketMessageOrBuilder message, final MarketEntryOrBuilder entry) {

    return entry.hasPriceMantissa();
  }
Пример #4
0
  /** message or entry market id must be present */
  public static boolean hasMarketId(
      final MarketMessageOrBuilder message, final MarketEntryOrBuilder entry) {

    return message.hasMarketId() || entry.hasMarketId();
  }
Пример #5
0
  /** entry is offset to message; 0 is default */
  public static int getTradeDate(
      final MarketMessageOrBuilder message, final MarketEntryOrBuilder entry) {

    return message.getTradeDate() + entry.getTradeDate();
  }
Пример #6
0
  /** entry is offset to message; 0 is default */
  public static long getTimeStamp(
      final MarketMessageOrBuilder message, final MarketEntryOrBuilder entry) {

    return message.getTimeStamp() + entry.getTimeStamp();
  }
Пример #7
0
  /** entry is offset to message; 0 is default */
  public static long getSequence(
      final MarketMessageOrBuilder message, final MarketEntryOrBuilder entry) {

    return message.getSequence() + entry.getSequence();
  }