public boolean equals()

in messages/src/main/java/com/epam/deltix/timebase/messages/schema/Descriptor.java [198:239]


  public boolean equals(Object obj) {
    if (this == obj) return true;
    if (!(obj instanceof Descriptor)) return false;
    Descriptor other =(Descriptor)obj;
    if (hasName() != other.hasName()) return false;
    if (hasName()) {
      if (getName().length() != other.getName().length()) return false; else {
        CharSequence s1 = getName();
        CharSequence s2 = other.getName();
        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 (hasTitle() != other.hasTitle()) return false;
    if (hasTitle()) {
      if (getTitle().length() != other.getTitle().length()) return false; else {
        CharSequence s1 = getTitle();
        CharSequence s2 = other.getTitle();
        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 (hasDescription() != other.hasDescription()) return false;
    if (hasDescription()) {
      if (getDescription().length() != other.getDescription().length()) return false; else {
        CharSequence s1 = getDescription();
        CharSequence s2 = other.getDescription();
        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;
  }