public boolean equals()

in messages/src/main/java/com/epam/deltix/timebase/messages/universal/BasePriceEntry.java [314:351]


  public boolean equals(Object obj) {
    if (this == obj) return true;
    boolean superEquals = super.equals(obj);
    if (!superEquals) return false;
    if (!(obj instanceof BasePriceEntryInfo)) return false;
    BasePriceEntryInfo other =(BasePriceEntryInfo)obj;
    if (hasPrice() != other.hasPrice()) return false;
    if (hasPrice() && !Decimal64Utils.equals(getPrice(), other.getPrice())) return false;
    if (hasSize() != other.hasSize()) return false;
    if (hasSize() && !Decimal64Utils.equals(getSize(), other.getSize())) return false;
    if (hasNumberOfOrders() != other.hasNumberOfOrders()) return false;
    if (hasNumberOfOrders() && getNumberOfOrders() != other.getNumberOfOrders()) return false;
    if (hasQuoteId() != other.hasQuoteId()) return false;
    if (hasQuoteId()) {
      if (getQuoteId().length() != other.getQuoteId().length()) return false; else {
        CharSequence s1 = getQuoteId();
        CharSequence s2 = other.getQuoteId();
        if ((s1 instanceof MutableString && s2 instanceof MutableString) || (s1 instanceof String && s2 instanceof String) || (s1 instanceof BinaryAsciiString && s2 instanceof BinaryAsciiString)) {
          if (!s1.equals(s2)) return false;
        } else {
          if (!CharSequenceUtils.equals(s1, s2)) return false;
        }
      }
    }
    if (hasParticipantId() != other.hasParticipantId()) return false;
    if (hasParticipantId()) {
      if (getParticipantId().length() != other.getParticipantId().length()) return false; else {
        CharSequence s1 = getParticipantId();
        CharSequence s2 = other.getParticipantId();
        if ((s1 instanceof MutableString && s2 instanceof MutableString) || (s1 instanceof String && s2 instanceof String) || (s1 instanceof BinaryAsciiString && s2 instanceof BinaryAsciiString)) {
          if (!s1.equals(s2)) return false;
        } else {
          if (!CharSequenceUtils.equals(s1, s2)) return false;
        }
      }
    }
    return true;
  }