Пример #1
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;
  }
Пример #2
0
  /** message or entry market id must be present */
  public static boolean hasMarketId(
      final MarketMessageOrBuilder message, final MarketEntryOrBuilder entry) {

    return message.hasMarketId() || entry.hasMarketId();
  }