예제 #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();
  }