public boolean equals()

in messages/src/main/java/com/epam/deltix/timebase/messages/universal/StatisticsEntry.java [209:232]


  public boolean equals(Object obj) {
    if (this == obj) return true;
    boolean superEquals = super.equals(obj);
    if (!superEquals) return false;
    if (!(obj instanceof StatisticsEntryInfo)) return false;
    StatisticsEntryInfo other =(StatisticsEntryInfo)obj;
    if (hasType() != other.hasType()) return false;
    if (hasType() && getType() != other.getType()) return false;
    if (hasValue() != other.hasValue()) return false;
    if (hasValue() && !Decimal64Utils.equals(getValue(), other.getValue())) return false;
    if (hasOriginalType() != other.hasOriginalType()) return false;
    if (hasOriginalType()) {
      if (getOriginalType().length() != other.getOriginalType().length()) return false; else {
        CharSequence s1 = getOriginalType();
        CharSequence s2 = other.getOriginalType();
        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;
  }