public boolean equals()

in java/io/bazel/rules/closure/Webpath.java [474:507]


  public boolean equals(Object other) {
    if (this == other) {
      return true;
    }
    if (!(other instanceof Webpath) || hashCode() != other.hashCode()) {
      return false;
    }
    String path2 = ((Webpath) other).path;
    int i = 0;
    int i2 = 0;
    while (true) {
      if (i == path.length()) {
        return i2 == path2.length();
      }
      if (i2 == path2.length()) {
        return false;
      }
      char c = path.charAt(i++);
      if (c == SEPARATOR) {
        while (i < path.length() && path.charAt(i) == SEPARATOR) {
          i++;
        }
      }
      char c2 = path2.charAt(i2++);
      if (c != c2) {
        return false;
      }
      if (c2 == SEPARATOR) {
        while (i2 < path2.length() && path2.charAt(i2) == SEPARATOR) {
          i2++;
        }
      }
    }
  }