public boolean equals(Object o) {
    if (this == o) return true;
    if (!(o instanceof Constituent)) return false;

    final Constituent constituent = (Constituent) o;

    if (end != constituent.end) return false;
    if (start != constituent.start) return false;
    if (label != null ? !label.equals(constituent.label) : constituent.label != null) return false;

    return true;
  }