public boolean equals()

in messages/src/main/java/com/epam/deltix/timebase/messages/schema/NonStaticField.java [164:185]


  public boolean equals(Object obj) {
    if (this == obj) return true;
    boolean superEquals = super.equals(obj);
    if (!superEquals) return false;
    if (!(obj instanceof NonStaticField)) return false;
    NonStaticField other =(NonStaticField)obj;
    if (hasIsPrimaryKey() != other.hasIsPrimaryKey()) return false;
    if (hasIsPrimaryKey() && isPrimaryKey() != other.isPrimaryKey()) return false;
    if (hasRelativeTo() != other.hasRelativeTo()) return false;
    if (hasRelativeTo()) {
      if (getRelativeTo().length() != other.getRelativeTo().length()) return false; else {
        CharSequence s1 = getRelativeTo();
        CharSequence s2 = other.getRelativeTo();
        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;
  }